Suppose I have:
string str;int num = 10;
I want str to be "The number was 10.\n";
How do I do that. I tried using the + operator between const strings, but it didn't work, I tried usign sprintf() but it did not accept std::string as the first argument. Any help?