Character string to an integer use: atoi
Code:
char dude[] = "50";
dude = atoi( dude );
You will have to figure out how to get a CString into a character array. The STL uses a .c_str() member funciton.
Int to a string use: sprintf
Code:
char dude[50];
int num = 50;
sprintf( dude, "%d", num );
This is quick and dirty C code. Many may say that sprintf nor atoi is safe to use. Here is a C++ replacement for using sprintf.
Code:
#include <strstream>
#include <iostream>
main()
{
std::strstream dude;
int i = 50;
dude << i << ends;
cout << dude.str() << endl;
}