char[] = "Beorn"; //array of 6 chars编译器会自动在字符串的末尾添加字符0.称以0结尾的字符串为c风格的字符串。所有的字符串常量都是 c风格的字符串。char* pc = "howdy"; // pc points to an array of 6 chars只有字符数组能够通过字符串进行初始化,但所有的数组都能够通过与其类型相匹配的值列表进行初始化。int ai[] = {1,2,3,4,5,6}; //array of 6 intsint ai2[100] = {0,1,2,3,4,5,6,7,8,9}; //the Read More
posted @ 2011-09-15 20:06
jc24
Views(240)
Comments(0)
Diggs(0)

浙公网安备 33010602011771号