I thought this would be really simple but it\'s presenting some difficulties. If I have
std::string name = \"John\"; int age = 21;
How do I
If you have C++11, you can use std::to_string.
std::to_string
Example:
std::string name = "John"; int age = 21; name += std::to_string(age); std::cout << name;
Output:
John21