Convert string type to int

来源:互联网 发布:网络直播歌手排名 编辑:程序博客网 时间:2024/05/01 13:57

#include <sstream>

 

std::string so = "123";

std::stringstream ss;
ss << so;
int current;
ss >> current;