摘要: 1.只有重载<的类或者结构才能作为map的key值。 class C{public: int i; string str; bool operator < (const C &c) const { return i < c.i; }}; 2.通过key获取value的方法 在map中,由key查找v 阅读全文
posted @ 2017-04-11 21:28 紫long 阅读(211) 评论(0) 推荐(0) 编辑