一、vector<int>转换成string

1 std::stringstream ss;
2 string testString;
3     std::reverse_copy(result.begin(),result.end(),ostream_iterator<int>(ss,""));
4 testString = ss.str();

二、string转换成int

string op;
int temp;
temp = atoi(op.substr(j,1).c_str());

 

相关文章:

  • 2021-10-02
  • 2022-01-15
  • 2021-06-19
  • 2021-08-18
  • 2021-09-13
  • 2021-11-16
  • 2022-12-23
  • 2021-08-20
猜你喜欢
  • 2022-12-23
  • 2021-07-22
  • 2021-09-18
  • 2022-12-23
  • 2021-12-24
  • 2021-10-24
  • 2021-05-30
相关资源
相似解决方案