C++11

// <string>
int stoi (const string& str, size_t* idx = 0, int base = 10);
int stoi (const wstring& str, size_t* idx = 0, int base = 10);

将字符串转化成带符号(Signed)整数。