This question is asked quite often, so here is a way of doing it using
stringstream
:
原文地址:
http://www.cplusplus.com/forum/articles/9645/
也可以参考这个:
http://stackoverflow.com/questions/191757/c-concatenate-string-and-int
number to string
| |
string to number
| |
Simple functions to do these conversions
| |
| |
原文地址:
http://www.cplusplus.com/forum/articles/9645/
也可以参考这个:
http://stackoverflow.com/questions/191757/c-concatenate-string-and-int