you can apply atoi () or atof () from the c language.

string s = "10";
int i = atoi(s.c_str()) ;...