It's very simple. The code snippet is below:
CString myString;
int nValue = 10;
myString.Format("%d", nValue); //myString //contains 10 now.

Similarly u can use %s, %c etc to format string, char to (CString similar to printf() in C)
There is one more useful member function in CString named FormatMessage(). It is a bit difficult to use compared to format but xtremely helpful. Check it out )
SatB