I just did a test using std:: and old-fashioned char[]. The fancy std:: is fifteen times slower than the strcat(). In a loop with intensive string manipulation, this could cause the program to get back to you in 15 seconds instead of 1 second. You don't mind waiting?
Here's the code (Visual Studio 2010):
#include <string>
#include <time.h>
char buf[64], buf2[64];
clock_t start = clock();
for(i = 0; i < 100000; i++)
{ _snprintf(buf, sizeof(buf), "%d", i);
_snprintf(buf2, sizeof(buf2), "%d", i * i);
#if defined FAST
strcat(buf, buf2);
#else
std::string s1 = buf;
std::string s2 = buf2;
std::string s3 = s1 + s2;
#endif
}
_snprintf(buf, sizeof(buf), "%.4f\n", (float)(clock() - start) / (float)CLK_TCK);
OutputDebugString(buf);