1. int sprintf( char *buffer, const char *format [, argument] ... );
<stdio.h>例如:int ss; char temp[64]; string str; ss = 1000; sprintf(temp, "%d", ss); string s(temp); //调用string的方法 cout<<
2.char *_itoa( int value, char *string, int radix );
<stdlib.h> 例如:char buffer[20]; int i = 3445; _itoa( i, buffer, 10 ); string s(buffer);
3. stringstream( )
<sstream.h> 例如:int hello=4; stringstream ss; ss<