摘要: 添加while(true)把显示菜单和选择框起来 system(“cls”)清空:用在实现完一个功能时 system(“pause”) exit(0)强制退出系统:用在退出程序的时候 阅读全文
posted @ 2023-03-20 11:15 cecel 阅读(22) 评论(0) 推荐(0)
摘要: 在职工管理系统中 文件夹内没有txt文件的时候增加员工并不会报错,而当第二次运行,也就是存在txt文件的时候增加员工就会报错, 添加this 阅读全文
posted @ 2023-03-16 17:07 cecel 阅读(26) 评论(0) 推荐(0)
摘要: stl 容器 算法 迭代器 仿函数 适配器 空间配置器 创建容器vector<int>v;//int类型可转为其他类型 放int型,自定义类型,指针类型(vector<Person *> v;),容器 创建数据 把数据放到容器内push_back 指针类型v.push_back(&p1); 遍历:用 阅读全文
posted @ 2023-03-07 17:26 cecel 阅读(40) 评论(0) 推荐(0)
摘要: 构造函数类名与函数名相同,实际是函数将类实例化。 一个文件cpp中的main访问另一个文件cpp函数: 1建立.h文件 写类并将函数成员写入 class test {public: void test06();}; 2在另一文件中声明 void test::test06() { 3在main中实例化 阅读全文
posted @ 2023-03-07 16:04 cecel 阅读(28) 评论(0) 推荐(0)