Its done almost like you posted it. Post what you have tried so that we can see what you might be doing wrong. You have to include <string>, and its lower-case "string", not "String". C++ is case sensitive, so you have to be careful about using capital letters.

In C++ there are multiple varieties of strings. C style strings are null terminated char arrays. dateStr and timeStr in post #4 are probably going to be used as null terminated char arrays. Null terminated char arrays cannot be concatenated using the + sign. They must be concatenated using strcat(), or similar function, which I believe is in the header file called cstring, or string.h if you have an outdated compiler. cstring also has other functions that can manipulate C style strings. The standard string class declared and defined by the header file called string is part of the Standard Template Library. STL string objects are not nulll terminated char arrays. They can be concatenated using the + operator.