会员
周边
新闻
博问
AI培训
云市场
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
Ancientwords
博客园
首页
新随笔
联系
订阅
管理
2021年12月10日
实验5 模板类和多态
摘要: task2 //Person.hpp #include<iostream> #include<string> #include<iomanip> using namespace std; class Person{ private: string name; string telephone; st
阅读全文
posted @ 2021-12-10 11:51 Ancientwords
阅读(33)
评论(2)
推荐(0)
编辑
2021年11月24日
实验4 继承
摘要: //Battery.hpp 1 #include<iostream> 2 using namespace std; 3 class Battery{ 4 private: 5 int capacity; 6 public: 7 Battery(int Capacity=70):capacity{Ca
阅读全文
posted @ 2021-11-24 19:50 Ancientwords
阅读(33)
评论(2)
推荐(0)
编辑
2021年11月5日
实验三 类与对象Ⅱ
摘要: #include<iostream> #include<cassert> using namespace std; class vector_int{ private: int q; int *p; public: vector_int(int Q,int P=0); vector_int(cons
阅读全文
posted @ 2021-11-05 16:08 Ancientwords
阅读(46)
评论(2)
推荐(0)
编辑
2021年10月29日
实验二 数组、指针与c++标准库
摘要: task5: 1 #include<iostream> 2 #include<string> 3 #include<cstring> 4 #include<iomanip> 5 using namespace std; 6 7 class Info 8 { 9 public: 10 Info(str
阅读全文
posted @ 2021-10-29 13:56 Ancientwords
阅读(30)
评论(2)
推荐(0)
编辑
2021年10月24日
实验1 类与对象
摘要: #include <iostream> #include<cmath> using namespace std; class complex{ public: complex(double real=0, double imag=0):REAL{real},IMAG{imag}{} complex(
阅读全文
posted @ 2021-10-24 22:36 Ancientwords
阅读(28)
评论(3)
推荐(0)
编辑