摘要:
task3_1.cpp 1 #include <iostream> 2 #include <fstream> 3 #include <array> 4 #define N 5 5 6 int main() { 7 using namespace std; 8 9 array<int, N> x{ 9 阅读全文
摘要:
task4: pets.hpp 1 #pragma once 2 #include <iostream> 3 #include <string> 4 using namespace std; 5 6 // 定义基类,机器宠物类 MachinePets 7 class MachinePets { 8 阅读全文
摘要:
point1.hpp 1 #pragma once 2 3 #include <iostream> 4 using std::cout; 5 using std::endl; 6 7 class Point { 8 public: 9 Point():x{0},y{0} {} 10 Point(in 阅读全文
摘要:
task1_1.cpp 1 #include <iostream> 2 3 using std::cout; 4 using std::endl; 5 6 // 类A的定义 7 class A { 8 public: 9 A(int x0, int y0) :x{ x0 }, y{ y0 } {} 阅读全文
摘要:
实验4: Complex.hpp文件源码 1 #pragma once 2 3 // Complex类的定义 4 #include <iostream> 5 6 using namespace std; 7 8 // Complex类的声明 9 class Complex { 10 public: 阅读全文
摘要:
1 // Point类 2 // 相较于教材,在构造函数的写法上,采用了业界更通用的初始化列表方式 3 4 #include <iostream> 5 6 using std::cout; 7 using std::endl; 8 9 // 定义Point类 10 class Point { 11 阅读全文
摘要:
https://www.cnblogs.com/xiao-shi/ 阅读全文