当前位置:Linux教程 - Linux文化 - wchar_t在linux下是如何定义的,占几个字节

wchar_t在linux下是如何定义的,占几个字节


>>> 此贴的回复 >> 我在AS3下是4个字节 #include int main() { char str[] = "hello"; wchar_t ws = L"hello"; printf("sizeof str is %d\nsizeof ws is %d\n",sizeof str,sizeof ws); return 0; } [root@data root]gcc test.c -o test [root@data root]./test sizeof str is 6 sizeof ws is 24