摘要: string有个成员函数,assign()可以这样:1 string str;2 str.assign(temp, sizeof(temp)); 阅读全文