I need to concatenate two const chars like these:
const char *one = \"Hello \";
const char *two = \"World\";
How might I go about doing tha
const char *one = "Hello ";
const char *two = "World";
string total( string(one) + two );
// to use the concatenation as const char*, use:
total.c_str()
Updated: changed
string total = string(one) + string(two);
to string total( string(one) + two ); for performance reasons (avoids construction of string two and temporary string total)
// string total(move(move(string(one)) + two)); // even faster?