摘要:
使用swap 回收多余空间 #include<vector> #include<iostream> using namespace std; int main(){ vector<int> v; for (int i = 0; i < 100000; ++i) { v.push_back(i); } 阅读全文
摘要:
示例代码 #include "iostream" //operator+ using namespace std; class A{ public: int m_age; public: A(){} A(int age):m_age(age){} // A operator+(const A &a) 阅读全文