1.

利用stringstream类

定义头文件#include<sstream>

通过

int a;

char b;

sstream ss,ss1;

ss<<a;

ss1<<b;

string s1=ss.str();

string s2=ss.str();

2.string类型初始化时用双引号("")

3.基本熟悉了标准库模板vector

  定义变量vector<类型>变量名 还需尽快掌握迭代器的相关用法

相关文章:

  • 2021-10-11
  • 2022-02-12
  • 2022-12-23
  • 2021-07-13
  • 2021-12-04
  • 2021-09-06
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-01
  • 2021-08-28
  • 2022-12-23
相关资源
相似解决方案