构造函数的初始化
怎么结构体类型的变量不能在构造函数里初始化?FiendLanguage::FiendLanguage()
{
A = "sae";
sentence = new char;
translate[10] =
{
{'t',"天"},
{'d',"地"},
{'s',"上"},
{'a',"一只"},
{'e',"鹅"},
{'z',"追"},
{'g',"敢"},
{'x',"下"},
{'n',"蛋"},
{'h',"恨"}
};
}
怎么结构体类型的变量不能在构造函数里初始化?
编译器报错啊