Here is a piece of C++ code that shows some very peculiar behavior. For some strange reason, sorting the data