#pragma once vs include guards? [duplicate]

I don’t think it will make a significant difference in compile time but #pragma once is very well supported across compilers but not actually part of the standard. The preprocessor may be a little faster with it as it is more simple to understand your exact intent. #pragma once is less prone to making mistakes … Read more

“std::endl” vs “\n”

The varying line-ending characters don’t matter, assuming the file is open in text mode, which is what you get unless you ask for binary. The compiled program will write out the correct thing for the system compiled for. The only difference is that std::endl flushes the output buffer, and ‘\n’ doesn’t. If you don’t want … Read more