2013年10月23日
摘要: 在C语言中:char a = 'a';sizeof(char) = 1;sizeof(a) = 1;sizeof('a') = 4;在C++语言中:char a = 'a';sizeof(char) = 1;sizeof(a) = 1;sizeof('a') = 1;这是ISO C和ISO C++的一个区别:In C, character literals(字符常量) such as 'a' have type int, and thus sizeof('a') isequal to sizeof( 阅读全文
posted @ 2013-10-23 21:00 运动和行动 阅读(655) 评论(0) 推荐(0) 编辑