摘要:
strlen是求可见字符串的长度,不包括结束字符'\n'sizeof是包括结束字符 '\n’ char man[12] = {"hello world"}; cout << man << endl; cout << "strlen(man):" << strlen(man) << endl; // 11 cout << "sizeof(man):" << sizeof(man) << endl; // 12char 阅读全文
posted @ 2012-06-23 20:43
沙场醉客
阅读(147)
评论(0)
推荐(0)

浙公网安备 33010602011771号