📜  将 int 附加到 cpp 中的字符串 - C++ 代码示例

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

代码示例1
#include      // to use std::string, std::to_string() and "+" operator acting on strings 

int i = 4;
std::string text = "Player ";
text += std::to_string(i);