9
.
3
如果我可以寫 char a[] =
"
Hello, world!
"
; 為什麼我不能寫 char a[14]; a =
"
Hello, world!
"
;
字符串是數組, 而你不能直接用數組賦值。 可以使用 strcpy() 代替:
strcpy(a, "Hello, world!");
參見問題
1.13
,
4.1
和
7.2
。
翻譯朱群英、孫雲, LaTeX2HTML 編譯 朱群英 (2005-06-23)