旺仔烧麦
旺仔烧麦
全部文章
分类
归档
标签
去牛客网
登录
/
注册
旺仔烧麦的博客
TA的专栏
46篇文章
0人订阅
C/C++题解
46篇文章
26人学习
全部文章
(共67篇)
题解 | 重载小于号
#include <iostream> using namespace std; class Time { public: int hours; // 小时 int minutes; // 分钟 Time() ...
2026-01-10
0
15
题解 | 加号运算符重载-构造函数重载-深拷贝、析构函数应用场景
来自专栏
#include <iostream> using namespace std; class Time { public: int hours; // 小时 int minutes; // 分钟 Time() ...
2026-01-10
0
16
题解 | 友元类的声明-带参数的构造函数初始化
来自专栏
#include<bits/stdc++.h> using namespace std; class phone{ // write your code here...... friend class myphone; private: int price; public:...
2026-01-09
0
10
题解 | 数组类的拷贝构造函数
来自专栏
#include<bits/stdc++.h> using namespace std; class Array{ private: int n;//数组大小 int *a;//数组 public: Array(){ cin>>n; a=new...
2026-01-09
0
11
题解 | 浅拷贝和深拷贝
来自专栏
#include <iostream> #include <cstring> #pragma warning(disable : 4996) using namespace std; class Person { public: char* nam...
2026-01-09
0
14
题解 | 覆盖成员变量的同名错误 | 数组类的构造函数
来自专栏
#include<bits/stdc++.h> using namespace std; class Array{ private: int n;//数组大小 int *a;//数组 public: // write your code here...... ...
2026-01-09
0
11
题解 | 构造函数的初始化
来自专栏
#include <iostream> #include <string> using namespace std; // Person类 class Person { public: string name; // 姓名 i...
2026-01-09
0
13
题解 | 长方形的关系
来自专栏
#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
10
题解 | this->的应用 | 点和圆的关系
来自专栏
#include <iostream> using namespace std; // 点类 class Pointer { private: int x; // x 坐标 int y; // y 坐标 public: ...
2026-01-09
0
12
题解 | 设计立方体类
来自专栏
#include <iostream> using namespace std; class Cube { private: int length; int width; int height; public: ...
2026-01-09
0
12
首页
上一页
1
2
3
4
5
6
7
下一页
末页