Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert Integer to String?

Status
Not open for further replies.
As per my knowledge, there is no standard function in MFC to convert an interger to string. You will have use _itoa() function.

int num = 10;
char ch[7];
_itoa(num, ch, 10);
CString str(ch);

Hope this is what u want.

raochetan
 
Hey, here's an alternative approach :-D:

int iNumber = 10;
CString szString;
szString.Format("%d", iNumber);

MaxHeadroom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top