12
string a;char n[10]=a.c_str();
string a;int n=atoi(a.c_str());
string a;double n=atof(a.c_str());
123456
int num = '3' - '0';//3//错误做法:char c = 1;a = (int)c;cout << a;//49
char c = 1 + '0';//不可以用char c = char(1)