const char Snames[] = {"Spring", "Summer", "Fall", "Winter"} // error C2078: too many initializers
樓主你const char Snames[]只是一個const的普通一維字符數組,不能這樣初始化
你要放多個字符串的話可以使用二維數組或者指針數組
const char Snames[][7] = {"Spring", "Summer", "Fall", "Winter"}; //二維數組形式
const char *Snames[] = {"Spring", "Summer", "Fall", "Winter"}; //指針數組形式