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
In C++20 you'll be able to do:
auto result = std::format("{}{}", name, age);
In the meantime you can use the {fmt} library, std::format is based on:
std::format
auto result = fmt::format("{}{}", name, age);
Disclaimer: I'm the author of the {fmt} library and C++20 std::format.