cpp
hehern
无人驾驶小白
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
vector push_back普通指针的感想
vector push_back普通指针的感想#include <vector>#include <iostream>//vector push_back是变量内容的拷贝,而且是深拷贝,对于数据来说,变量中存储的内容就是变量值。对于指针来说,变量内存储的内容是指针指向的内存地址,/*1 2 3 4 5 5 5 5 1 2 3 4*/void test1(){ std::vector<int> vec; int num1 = 1; in原创 2021-03-13 15:57:29 · 1932 阅读 · 0 评论 -
C++举例说明拷贝构造函数与赋值运算符重载函数
#include <iostream>using namespace std;class test{ public: test(){ cout << "constructor" << endl; } test(const test& a) { cout << "copy constructor" << endl; } ~test(){} t原创 2020-08-25 17:05:24 · 176 阅读 · 0 评论
分享