I\'m trying to do something very simple and yet, after an hour of so of searching a I can\'t find a suitable answer so I must be missing something fairly obvious.
I\
Have you considered using stringstreams?
#include #include std::ostringstream oss; oss << "sometext" << somevar << "sometext" << somevar; std::string var = oss.str();