05 2022 档案
摘要:1 #include <iostream> 2 #include <vector> 3 4 using namespace std; 5 6 template <class TParam> 7 class SlotBase 8 { 9 public: 10 virtual void slotFunc
阅读全文
摘要:这是第十一天的学习。 1 #include <iostream> 2 #include <deque> 3 #include <algorithm> 4 #include <list> 5 #include <stack> 6 #include <queue> 7 #include <set> 8
阅读全文
摘要:这是第十天的学习 1 #include <iostream> 2 #include <vector> 3 #include <algorithm> 4 #include <deque> 5 using namespace std; 6 7 template <class T> 8 bool cmp(
阅读全文
摘要:这是第九天的学习。 1 #include <iostream> 2 #include <memory> 3 4 using namespace std; 5 class A 6 { 7 int id; 8 public: 9 A(int id) : id(id) { cout << "A" << e
阅读全文
摘要:这是第八天的学习记录。 1 #include <iostream> 2 3 using namespace std; 4 5 class A 6 { 7 public: 8 A() { cout << "A" << endl; } 9 A(const A& a) { cout << "copy A"
阅读全文
摘要:这是第七天的学习。 1 #include <iostream> 2 3 using namespace std; 4 class Base 5 { 6 public: 7 int memb = 9; 8 public: 9 //Base() { cout << "Base" << endl; } 1
阅读全文
摘要:这是第六天的学习 1 #include <iostream> 2 3 using namespace std; 4 5 class A 6 { 7 private: 8 int num = 10; 9 public: 10 A() { cout << " This is A constructor.
阅读全文
摘要:这是第五天的记录。 1 #include <iostream> 2 3 using namespace std; 4 5 class Student 6 { 7 private: 8 string name; 9 int age; 10 static int amount; 11 public: 1
阅读全文
摘要:程序虽然能跑通,但是有提示内存泄漏。 1 #ifndef STUDENT_H 2 #define STUDENT_H 3 #include <iostream> 4 5 using namespace std; 6 7 class Student 8 { 9 string name; 10 int
阅读全文
摘要:这是第三天的学习记录 1 #include <iostream> 2 3 using namespace std; 4 class B 5 { 6 public: 7 B() { cout << "B construction !" << endl; } 8 ~B() { cout << "B de
阅读全文
摘要:这是第二天学习的代码。 1 #include <iostream> 2 3 using namespace std; 4 5 // 引用 6 int add(int& a, int& b) 7 { 8 return a+b; 9 } 10 void swap(int& a, int& b) 11 {
阅读全文
摘要:终于又更新博客了,这次更新的内容是关于C++学习记录的。 1 #include <iostream> 2 #include <cstring> 3 4 //using namespace std; // 这种方式会包含许多不需要的内容 5 using std::cout; // 这种方式就很轻便 6
阅读全文