Have you considered using stringstreams?
#include <string>
#include <sstream>
std::ostringstream oss;
oss << "sometext" << somevar << "sometext" << somevar;
std::string var = oss.str();
Have you considered using stringstreams?
#include <string>
#include <sstream>
std::ostringstream oss;
oss << "sometext" << somevar << "sometext" << somevar;
std::string var = oss.str();