How to convert int and std::string to char* ?
I'm trying to do this :
int a = 1;
std::string b = "str";
char* x = a + b;
I don't want something like this:
std::stringstream ss;
std::string str2char;
ss << a;
str2char = ss.str() + "str";
std::vector<char> writable(str2char.size() + 1);
std::copy(str2char.begin(), str2char.end(), writable.begin());
x = &writable[0];
How to deal with this, please.