cyt涛
cyt涛
全部文章
分类
归档
标签
去牛客网
登录
/
注册
cyt涛的博客
全部文章
(共31篇)
题解 | #多态实现求面积体积#
#include<bits/stdc++.h> using namespace std; class rectangle{ private: int length,width; public: rectangle(int x,int y){ length=x; w...
2023-03-11
0
351
题解 | #多态实现计算器功能#
#include <iostream> using namespace std; class BaseCalculator { public: int m_A; int m_B; // write your code here.....
2023-03-11
0
353
题解 | #求长方体表面积#
#include<bits/stdc++.h> using namespace std; class rectangle{ private: int length,width; public: rectangle(int x,int y){ length=x; w...
2023-03-11
0
324
题解 | #构建长方体类#
#include<bits/stdc++.h> using namespace std; class rectangle{ private: int length,width; public: rectangle(int x,int y){ length=x; w...
2023-03-11
0
312
题解 | #重写子类计算逻辑#
#include <iostream> using namespace std; class Base { private: int x; int y; public: Base(int x, int y) { this->x = x;...
2023-03-11
0
319
题解 | #子类中调用父类构造#
#include <iostream> using namespace std; class Base { private: int x; int y; public: Base(int x, int y) { ...
2023-03-11
0
388
题解 | #重载小于号#
#include <iostream> using namespace std; class Time { public: int hours; // 小时 int minutes; // 分钟 Time() ...
2023-03-11
0
303
题解 | #加号运算符重载#
#include <iostream> using namespace std; class Time { public: int hours; // 小时 int minutes; // 分钟 Time() ...
2023-03-11
0
291
题解 | #友元全局函数#
#include <iostream> using namespace std; class Person { // write your code here...... friend void showAge(Person& p); public: ...
2023-03-10
0
253
题解 | #数组类的拷贝构造函数#
#include<bits/stdc++.h> #include <cstring> using namespace std; class Array{ private: int n;//数组大小 int *a;//数组 public: Array(){ ...
2023-03-10
0
370
首页
上一页
1
2
3
4
下一页
末页