摘要:
一、枚举 1210. 连号区间数 #include <iostream> #include <cstring> #include <algorithm> using namespace std; const int N = 10005; int a[N],n,ans; int Max,Min; in 阅读全文
摘要:
一、深拷贝与浅拷贝 浅拷贝:简单的赋值操作,会导致指针指向同一内存地址 如果利用编译器提供的拷贝构造函数,会做浅拷贝操作 浅拷贝带来的问题是:堆区内存重复释放,引发崩溃 深拷贝:在堆区重新申请空间,进行拷贝操作 public: int age; string name; int *height; p 阅读全文