Useful tip for C++ programmers who’ve come from a different language like Python, Java etc.
Use cout << "some text" << aVariable; instead of trying to concatenate (join) the strings like you would in PHP, Python, Java etc. Trying to join the variable (if it’s not already a string) to a string is overly complex if your aim is just to write out the result of a calculation or something for debugging.
C++ cout
30th Jan 2008