会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
fch20030128
博客园
首页
新随笔
联系
订阅
管理
2022年12月3日
实验六 模板类和文件I/O
摘要: 实验任务三 #include <iostream> #include <fstream> #include <array> #define N 5 int main() { using namespace std; array<int, N> x {97, 98, 99, 100, 101}; of
阅读全文
posted @ 2022-12-03 18:55 小樊_1973
阅读(7)
评论(0)
推荐(0)
2022年11月26日
实验五 继承和多态
摘要: 实验任务4 #pragma once #include<iostream> #include<string> using namespace std; class MachinePets{ public: string nickname ; MachinePets(const string s):n
阅读全文
posted @ 2022-11-26 19:35 小樊_1973
阅读(14)
评论(0)
推荐(0)
2022年11月5日
实验四 类与数组、指针
摘要: 实验任务5 #pragma once #include<iostream> #include<cassert> using namespace std; class vectorInt{ public: vectorInt(int n):size{n} { p=new int[size]; cout
阅读全文
posted @ 2022-11-05 08:10 小樊_1973
阅读(22)
评论(0)
推荐(0)
2022年10月24日
实验3
摘要: 任务5 #pragma once #include<iostream> #include<string> #include<iomanip> using namespace std; class Info{ public: Info(string name,string cot,string cty
阅读全文
posted @ 2022-10-24 10:55 小樊_1973
阅读(17)
评论(0)
推荐(0)
2022年10月16日
实验2 类和对象(2)
摘要: 实验任务4 #pragma once #include<iostream> #include<cmath> using namespace std; //定义Complex类 class Complex{ public: Complex(double r=0,double i=0):real{r},
阅读全文
posted @ 2022-10-16 18:54 小樊_1973
阅读(22)
评论(0)
推荐(0)
2022年9月29日
实验一 类和对象(1)
摘要: 任务2:// Point类 // 相较于教材,在构造函数的写法上,采用了业界更通用的初始化列表方式 #include <iostream> using std::cout; using std::endl; // 定义Point类 class Point { public: Point(int x0
阅读全文
posted @ 2022-09-29 20:41 小樊_1973
阅读(10)
评论(0)
推荐(0)
公告