void push_back (char c);//在string的结尾放置一个字符

#include <iostream>
#include <string>

using namespace std;

int main()
{
string str("hello world");
str.push_back('!');
cout << str << endl;
return 0;
}

相关文章:

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