#include guard [1]
---------------------------------------------------------------
Common way is to put 'include guard' to stop include header files twice. But when naming is conflict with other macros defined in other modules. It become an issue. So some C and C++ implementations provide a non-standard
#pragma once
directive; The Objective-C language (which is a superset of C) introduced an #import
directive, which works exactly like #include
, except that it includes each file only once, thus obviating the need for #include guards
No comments:
Post a Comment