摘要: int main() { typedef map myMap; myMap test; //插入 test.insert(pair(1, "a")); test.insert(pair(2, "b")); test.insert(pair(3, "c")); test.insert(pair(4, "d")); test.inser... 阅读全文
posted @ 2018-08-23 21:49 aote369 阅读(1354) 评论(0) 推荐(0) 编辑
摘要: size变小 capacity没有变化 阅读全文
posted @ 2018-08-23 16:30 aote369 阅读(4694) 评论(0) 推荐(0) 编辑
摘要: class A { public: A(int n):m_n(n){ m_ptr = new int(m_n); } A(const A& x){ m_n = x.m_n; m_ptr = new int(m_n); memcpy(m_ptr, x.m_ptr, sizeof(int)*m_n); }... 阅读全文
posted @ 2018-08-23 14:44 aote369 阅读(188) 评论(0) 推荐(0) 编辑