我知道一個中文字為2個字元,C++利用空字元('\0')來辨別字元陣列是否為字串,所以一個中文字+'\0'為3個字元。所以這題我這樣宣告字元陣列:
int i,a=0;
int b[10]={0};
char c[10][3]={"零","壹","貳","參","肆","伍","陸","柒","捌","玖"};
char d[4][3]={"","拾","佰","仟"};
系統回我.....:initializer-string for array of chars is too long ,改成c[10][4] d[4][4] 她才放行;
請問這種狀況是什麼原因呢? 初學者比較多問題請大家包含,或者有什麼地方可以尋找答案的請推薦一下;謝謝~