结构体内的变量可以赋初值吗

如题所述

class Str { public: Str(){memset(t,0,20);} // 在构造里把t赋初值为空 private: char t[20]; };
温馨提示:答案为网友推荐,仅供参考
相似回答