![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
学习c++
NJNUqhx
大一新生,努力学习ing
展开
-
2021年1月28日15:40:40 基于多态的职工管理系统实验(寒假第一个项目,耗时三个半天)
#include<iostream>#include<fstream>#include<string>using namespace std;#include"workermanager.h"#include"worker.h"#include"employee.h"#include"manager.h"#include"boss.h"#define filename "work .txt"//void test()//{// worker* p.原创 2021-01-28 15:45:11 · 173 阅读 · 0 评论 -
2021年1月27日18:11:41 二进制读写文件
#include<iostream>#include<string>#include<fstream>using namespace std;class person{public: char name[64]; int age;};void test(){ ofstream ofs("person.txt",ios::out|ios::binary); person p = { "black",18 }; ofs.write((const .原创 2021-01-27 18:13:22 · 113 阅读 · 0 评论 -
2021年1月27日16:28:10 文件读写
#include<iostream>#include<fstream>#include<string>using namespace std;void func(){ cout << "-------------------" << endl;}void test1(){ ofstream ofs; ofs.open("test1.txt",ios::out); ofs << "name:black" <.原创 2021-01-27 16:28:32 · 107 阅读 · 0 评论 -
2021年1月25日08:53:27
#include<iostream>#include<string>using namespace std;/* 2021年1月25日08:28:31 类 圆类练习,学生类 1.类中的属性和行为 成员 2.属性 成员属性 成员变量 3.行为 成员函数 成员方法 */const double pi = 3.14;class circle{public: int r;//属性 double calculate() { return 2 * r * p.原创 2021-01-25 08:54:10 · 89 阅读 · 0 评论