- #include <sstream>
-
- void int2str(const int &int_temp,string &string_temp)
- {
- stringstream stream;
- stream<<int_temp;
- string_temp=stream.str(); //此处也可以用 stream>>string_temp
- }
-
- void str2int(int &int_temp,const string &string_temp)
- {
- stringstream stream(string_temp);
- stream>>int_temp;
- }
07-26
07-26
05-24