r/C_Programming • • 28d ago

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

79 Upvotes

58 comments sorted by

View all comments

1

u/71d1 28d ago

My opinion is that unless you want your code to run on compilers that do not support pragma, use pragma.