Answers for "adding an integer value to string c++"

C++
0

appending int to string in cpp

#include <string>     // to use std::string, std::to_string() and "+" operator acting on strings 

int i = 4;
std::string text = "Player ";
text += std::to_string(i);
Posted by: Guest on August-21-2021

Code answers related to "adding an integer value to string c++"

Browse Popular Code Answers by Language