[Solved] Extra details in output of c++ using g++


From all the info you have given, it seems that no new line is being printed on the end of the output, that means the either you forgot to recompile when you added std::endl, or you have misplaced it.

Edit:
I just ran your code the way you posted it. The endl worked correctly, and the command line was placed below the output of your code. You are clearly running an old binary, from when the code didn’t had the endl yet. Look carefully in your g++ invocation the name of the generated file (the name after -o), and where it is being placed. You may try to rename the executable file you are running to something else, and run g++ to see if a new file is generated with the name you are expecting.

5

solved Extra details in output of c++ using g++