摘要: #include <stdio.h> void main(){ printf("hello world.\n"); } gcc hello.c -o hello -std=c99 编译通过。 但通过如下编译则失败—— g++ hello.c -o hello -std=c++11 失败信息为: he 阅读全文
posted @ 2017-08-16 17:47 atoman 阅读(1394) 评论(0) 推荐(0) 编辑
摘要: C++中有两种类型的容器:顺序容器和关联容器。 顺序容器主要有vector、list、deque等。其中vector表示一段连续的内存,基于数组实现,list表示非连续的内存,基于链表实现,deque与vector类似,但是对首元素提供插入和删除的双向支持。 关联容器主要有map和set。map是k 阅读全文
posted @ 2017-08-16 11:47 atoman 阅读(248) 评论(0) 推荐(0) 编辑