//Convert to a character pointer
char *p = str。 GetBuffer (string. GetLength());
//Convert to int variable
int I = atoi(p);
Cout & lt& lt I<& ltendl
//Convert to floating-point variable
str = " 123.32 ";
float f = atof(str。 GetBuffer (string. GetLength()));
cout & lt& ltf & lt& ltendl