摘要: 3.1.cpp #include <iostream> #include <fstream> #include <array> #define N 5 int main() { using namespace std; array<int, N> x {97, 98, 99, 100, 101}; 阅读全文
posted @ 2022-12-06 19:40 观湖 阅读(21) 评论(0) 推荐(0) 编辑
摘要: task4 pets.hpp #include<iostream> using namespace std; class MachinePets{ private: string nickname; public: const string get_nickname(){return nicknam 阅读全文
posted @ 2022-11-27 10:54 观湖 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 实验任务5 vectorint.hpp 1 #pragma once 2 #include<cassert> 3 #include<iostream> 4 using namespace std; 5 class vectorint { 6 public: 7 vectorint(int m) { 阅读全文
posted @ 2022-11-07 10:58 观湖 阅读(13) 评论(0) 推荐(0) 编辑
摘要: GCH文件 GCH文件是将H文件当作CPP进行编译之后出现的结果, 在头文件进行编译后就会在文件夹中看到一个 “文件名.h.gch” 的文件。 那么在再次对gch文件进行编译的时候就会将gch当作cpp一样对待。 这是一种预编译,这样可以提高编译的速度,但是gch文件并不会随着你对头文件的修改而修改 阅读全文
posted @ 2022-11-03 17:11 观湖 阅读(979) 评论(0) 推荐(1) 编辑
摘要: 实验 任务5 info.hpp 1 #pragma once 2 #include<iostream> 3 #include<string> 4 #include<vector> 5 using namespace std; 6 class info { 7 private: 8 string ni 阅读全文
posted @ 2022-10-25 17:42 观湖 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 实验二 类和对象(2) 代码不是很简洁,有机会再改改。 阅读全文
posted @ 2022-10-18 22:34 观湖 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 实验任务2 #include<iostream> using std::cout; using std::endl; class Point{ public: Point(int x0 = 0, int y0 = 0); Point(const Point &p); ~Point() = defau 阅读全文
posted @ 2022-09-29 22:22 观湖 阅读(25) 评论(0) 推荐(0) 编辑