上一页 1 ··· 78 79 80 81 82 83 84 85 86 ··· 92 下一页
摘要: #include<iostream> #include<stdlib.h> #include<string> using namespace std; /* 3.1.4 string字符串拼接 string& operator+=(const char* str); //重载+=操作符 string 阅读全文
posted @ 2021-04-22 22:05 yub4by 阅读(141) 评论(0) 推荐(0)
摘要: #include<iostream> #include<stdlib.h> #include<string> using namespace std; /* 3.1.3 string赋值操作 string& operator=(const char* s); //char*类型字符串 赋值给当前的字 阅读全文
posted @ 2021-04-22 22:04 yub4by 阅读(191) 评论(0) 推荐(0)
摘要: #include<iostream> #include<stdlib.h> #include<string> using namespace std; /* 3.1 string容器 3.1.1 string基本概念 string和char * 区别: char * 是一个指针 string是c++ 阅读全文
posted @ 2021-04-22 22:02 yub4by 阅读(137) 评论(0) 推荐(0)
摘要: #include<iostream> #include<stdlib.h> #include<string> using namespace std; #include <vector> #include <algorithm> /* 2.5.3 vector容器嵌套容器 */ void test1 阅读全文
posted @ 2021-04-22 20:47 yub4by 阅读(139) 评论(0) 推荐(0)
摘要: #include<iostream> #include<stdlib.h> #include<string> using namespace std; #include<vector> #include<algorithm> /* 2.5.2 vector容器存放自定义数据类型 */ class P 阅读全文
posted @ 2021-04-22 20:45 yub4by 阅读(175) 评论(0) 推荐(0)
摘要: #include<iostream> #include<stdlib.h> #include<string> using namespace std; #include<vector> #include<algorithm> /* 2.5.1 vector放置内置数据类型 容器: vector 算法 阅读全文
posted @ 2021-04-22 20:44 yub4by 阅读(73) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2021-04-22 19:44 yub4by 阅读(46) 评论(0) 推荐(0)
摘要: MyArray.hpp #pragma once #include<iostream> #include<string> using namespace std; template<class T> class MyArray { public: // 有参构造 MyArray(int capaci 阅读全文
posted @ 2021-04-18 14:20 yub4by 阅读(157) 评论(0) 推荐(0)
摘要: #include<iostream> #include<stdlib.h> #include<string> using namespace std; /* 1.3.8类模板与友元 掌握类模板配合友元函数的类内和类外实现 全局函数类内实现 - 直接在类内声明友元即可 全局函数类外实现 - 需要提前让 阅读全文
posted @ 2021-04-18 14:16 yub4by 阅读(57) 评论(0) 推荐(0)
摘要: person.h #pragma once #include<iostream> #include<string> using namespace std; template<class T1, class T2> class Person{ public: T1 name; T2 age; Per 阅读全文
posted @ 2021-04-18 14:15 yub4by 阅读(73) 评论(0) 推荐(0)
上一页 1 ··· 78 79 80 81 82 83 84 85 86 ··· 92 下一页