2022年12月4日

实验6 模板类和文件IO

摘要: task3_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-04 16:12 cflxl 阅读(16) 评论(0) 推荐(0) 编辑

2022年11月28日

实验5 继承和多态

摘要: task4 pets.hpp #pragma once #include <iostream> #include <string> using namespace std; using std::string; class MachinePets { public: MachinePets(cons 阅读全文

posted @ 2022-11-28 14:02 cflxl 阅读(29) 评论(0) 推荐(0) 编辑

2022年11月4日

类与数组,指针

摘要: #pragma once #include <iostream> #include <algorithm> using namespace std; class vectorInt { public: vectorInt(int len) : length{len} { cout << "const 阅读全文

posted @ 2022-11-04 09:04 cflxl 阅读(22) 评论(0) 推荐(0) 编辑

2022年10月23日

数组,指针与现代c++标准

摘要: #include <iostream> #include <algorithm> #include <math.h> #include <string> using namespace std; class Info { public: Info(string nickname, string co 阅读全文

posted @ 2022-10-23 00:48 cflxl 阅读(8) 评论(0) 推荐(0) 编辑

2022年10月15日

类和对象

摘要: #include "complex.hpp" #include <iostream> void test() { using namespace std; Complex c1(6, 6); const Complex c2(6); Complex c3(c1); cout << "c1 = "; 阅读全文

posted @ 2022-10-15 20:09 cflxl 阅读(26) 评论(0) 推荐(0) 编辑

2022年9月29日

实验一 类和对象

摘要: #include <iostream> #include <algorithm> #include <vector> using namespace std; int main() { string s1; string s2{"c plus plus"}; string s3{s2}; strin 阅读全文

posted @ 2022-09-29 09:05 cflxl 阅读(33) 评论(0) 推荐(0) 编辑

2022年9月26日

the address of my blog

摘要: #include <iostream> using namespace std; int main() { cout << "https://www.cnblogs.com/cflxl/" << endl; return 0; } 阅读全文

posted @ 2022-09-26 14:08 cflxl 阅读(28) 评论(0) 推荐(0) 编辑

导航