Question around 'std::endl' code - TripleX

Started the TripleX game in the UE course. Does it matter where the ‘std::cout << std::endl’ code goes?
When I tried this myself, I entered it on line 8, however the instructor has it on line 11. When I complied and ran, i got the same result.

Can someone advise if there would have been an issue further down the road, or if there is a difference that I’m not aware of yet?

The code is going to be executed line by line, line 9 has no observable effect you can see in the terminal. Neither do lines 8 or 10 (whitespace is largely ignored). So it doesn’t matter.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms