c++ int转string类型

std::string int2string(int input){

std::ostringstream ss;

 

//clear string 

//ss.str("");

//ss.clear();

 

ss<<input;

return ss.str();

}

c++ - How to clear ostringstream - Stack Overflow

Easiest way to convert int to string in C++ - Stack Overflow

posted @ 2017-07-14 14:30  juejiang  阅读(352)  评论(0编辑  收藏  举报