#include <string>

 

#include <strstream>

#include <sstream>

std::string str = "123";

std::stringstream ss;

int i = 0;

ss<< str;

ss>> i;

就可以把字符"123", 变成 数字 123。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-08
  • 2022-12-23
  • 2022-12-23
  • 2021-08-01
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-02
  • 2021-10-24
  • 2022-12-23
  • 2021-12-25
相关资源
相似解决方案