摘要:
char* s1 = "hello"; char s2[] = "world";相同点:都是表示一个字符串。不同点:操作系统对它们在内存中的存储方式作了不同的处理。下面是测试代码:#include <iostream.h>int main(){ char *S1 = "Hello"; char S2[] = "World";// *(S1+2) = 'x'; // 执行时出错。 *(S2+5) = 'x'; // 执行时正确。 *(S2+6) = '/0' 阅读全文
posted @ 2010-12-20 17:07
Zhiqiang.Chen
阅读(131)
评论(0)
推荐(0)

浙公网安备 33010602011771号