直接为string类型的变量赋值就能初始化或改变它的值。如:class init{public:init(){s="你好,C++!";}init(string t){s=t;}string s;};string str="中国!";init o,o2(str);