一、std 内置的数字转字符串函数
std::string to_string(int value);
std::string to_string(long value);
std::string to_string(long long value);
std::string to_string(unsigned value);
std::string to_string(unsigned long value);
std::string to_string(unsigned long long value);
std::string to_string(float value);
std::string to_string(double value);
std::string to_string(long double value);
二、std 内置的字符串转数字函数
int std::stoi(const std::string& str,std::size_t* pos=0,int base = 10);
int std::stoi(const std::wstring& str,std::size_t* pos=0,int base = 10);
long std::stol(const std::string& str,std::size_t* pos=0,int base = 10);
long std::stol(const std::wstring& str,std::size_t* pos=0,int base = 10);
long long std::stoll(const std::string& str,std::size_t* pos=0,int base = 10);
long long std::stoll(const std::wstring& str,std::size_t* pos=0,int base = 10);
unsigned long stoul(const std::string& str,std::size_t* pos=0,int base = 10);
unsigned long stoul(const std::wstring& str,std::size_t* pos=0,int base = 10);
unsigned long long stoull(const std::string& str,std::size_t* pos=0,int base = 10);
unsigned long long stoull(const std::wstring& str,std::size_t* pos=0,int base = 10);
float std::stof(const std::string& str,std::size_t* pos=0);
float std::stof(const std::wstring& str,std::size_t* pos=0);
double std::stod(const std::string& str,std::size_t* pos=0);
double std::stod(const std::wstring& str,std::size_t* pos=0);
long double std::stold(const std::string& str,std::size_t* pos=0);
long double std::stold(const std::wstring& str,std::size_t* pos=0);
C++:字符串和数字的转换_miaow~miaow的博客-CSDN博客_std::string to number