All rights reserved. **source code is an unpublished work and the use of a copyright notice does not imply otherwise. This source code contains confidential, trade secret material of Any attempt or participation /* in deciphering, decoding, reverse
Java的在还没有发现新写法之前时,我一直是这么初始化List跟Map:
//初始化List
List list = new ArrayList();
list.add("string1");
list.add("string2");
//some other list.add() code……
list.add("stringN");
//初始化Map
Map map = new HashMap();
map.put("key1", "value1");
map.put("
这是C++11新特性介绍的第一部分,比较简单易懂,但是也有一些有趣的地方。
不想看toy code的读者可以直接拉到文章后看这部分的总结。
新类型
long long类型
C++11标准中新加入了long long类型属性,占用空间不小于long类型。测试代码如下:
long large = LONG_MAX;
long long long_large = LLONG_MAX;
long long long_long_large = 1LL <&l