旺仔烧麦
旺仔烧麦
全部文章
分类
归档
标签
去牛客网
登录
/
注册
旺仔烧麦的博客
TA的专栏
46篇文章
0人订阅
C/C++题解
46篇文章
60人学习
全部文章
(共69篇)
题解 | 重写子类计算逻辑
#include <iostream> using namespace std; class Base { private: int x; int y; public: Base(int x, int y) { this->x = x;...
2026-01-10
0
30
题解 | 子类中调用父类构造 | ::作用域限定符的使用
#include <iostream> using namespace std; class Base { private: int x; int y; public: Base(int x, int y) { ...
2026-01-10
0
52
题解 | 重载小于号
#include <iostream> using namespace std; class Time { public: int hours; // 小时 int minutes; // 分钟 Time() ...
2026-01-10
0
27
题解 | 加号运算符重载-构造函数重载-深拷贝、析构函数应用场景
来自专栏
#include <iostream> using namespace std; class Time { public: int hours; // 小时 int minutes; // 分钟 Time() ...
2026-01-10
0
43
题解 | 友元类的声明-带参数的构造函数初始化
来自专栏
#include<bits/stdc++.h> using namespace std; class phone{ // write your code here...... friend class myphone; private: int price; public:...
2026-01-09
0
24
题解 | 数组类的拷贝构造函数
来自专栏
#include<bits/stdc++.h> using namespace std; class Array{ private: int n;//数组大小 int *a;//数组 public: Array(){ cin>>n; a=new...
2026-01-09
0
25
题解 | 浅拷贝和深拷贝
来自专栏
#include <iostream> #include <cstring> #pragma warning(disable : 4996) using namespace std; class Person { public: char* nam...
2026-01-09
0
39
题解 | 覆盖成员变量的同名错误 | 数组类的构造函数
来自专栏
#include<bits/stdc++.h> using namespace std; class Array{ private: int n;//数组大小 int *a;//数组 public: // write your code here...... ...
2026-01-09
0
45
题解 | 构造函数的初始化
来自专栏
#include <iostream> #include <string> using namespace std; // Person类 class Person { public: string name; // 姓名 i...
2026-01-09
0
35
题解 | 长方形的关系
来自专栏
#include<bits/stdc++.h> using namespace std; class rectangle{ private: int length,width; public: void set(int x,int y){ length=x; wi...
2026-01-09
0
34
首页
上一页
1
2
3
4
5
6
7
下一页
末页