0
点赞
收藏
分享

微信扫一扫

Convert string to int in C++

闲云困兽 2022-09-08 阅读 234


Method-1

std::stoi(str);
// str is your number as std::string. C++11 need.

Method-2

string a = "25";
int

Method-3

std::istringstream

参考

  • ​​Convert string to int C++ [duplicate]​​


举报

相关推荐

0 条评论