Click to See Complete Forum and Search --> : Integer to ASCII


May 25th, 1999, 05:02 AM
how can I take an integer variable equal to 1123
and make it a string equal to "1123"

eg: int number=1123;
CString string;
string = number;

such that string ="1123"

Will Rothwell
May 25th, 1999, 05:10 AM
Hi,

The way I do it is:
int number=1123;
CString string;
string.Format("%d",number);

Hope this helps.

Will

May 25th, 1999, 05:21 AM
Or you could use C's itoa function!?!??!

char *itoa(int value, char *string, int radix);