Header Guards

A lot of people don’t know this, but #pragma once is actually an optimization. It is faster than using the #ifndef blocks.

But you’re in luck because you can safely write portable code with it, in case the compiler doesn’t recognize #pragma once by doing this:

Leave a Reply

You must be logged in to post a comment.