atoi("123"); cout << atoi(p) << endl; //到int cout << atol(p) << endl; //到long cout << atoll(p) << endl; //到long long cout << atof("3.14") << endl; //到doble #include<cstdlib>