#pragma once is NOT standard
But #ifndef is standard
#ifndef XXX_YYYY
#define XXX_YYYY
#endif // XXX_YYYY
In the compile-time #pragma once is faster.
https://stackoverflow.com/questions/1143936/pragma-once-vs-include-guards
https://beesbuzz.biz/code/1473-pragma-once-vs-ifndef-define
Sunday, December 29, 2019
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment