r/C_Programming • • 21d ago

Could someone explain the practical differences between #pragma once and traditional include guards (#ifndef, #define, and #endif)?

81 Upvotes

58 comments sorted by

View all comments

Show parent comment

1

u/juanfnavarror 21d ago

#pragma is compiler specific and not standard or portable. Except for most platforms and compilers that you might choose!!!!!