#include <iostream>
#include <string>
using namespace std ;
int main ( )
{
string str = "123456" ;
int num ;
num = atoi (str.c_str( )) ;
}
linux下g++调试,报错:
test.cpp: In function ‘int main()’:
test.cpp:9: error: ‘atoi’ was not declared in this scope
慕森卡
MYYA
相关分类