STL tips

std是一个 命名空间的名字。
STL是 Standard Template Library的缩写,即标准模板库。

std::to_string

1
2
// Converting number to string
std::string str = std::to_string(9954);

std::atoi

1
2
int num = std::atoi("9954");