📜  如何附加到字符串 - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:50.726000             🧑  作者: Mango

代码示例1
#include 
#include 

int main() {
  std::string sentence{"She"};
  sentence.append(" is playing");
  sentence += " the piano.";
}

Output:
She is playing the piano.