??? 01/10/08 18:00 Read: times |
#149250 - To spell it out for you... Responding to: ???'s previous message |
main.h // "Public" Symbols from main.c // Decide whether "PUBLIC" is to provide a definition or a declaration #if defined DO_MAIN_DEFINITIONS // "PUBLIC" is to provide a definition #define DOC #else // "PUBLIC" is to provide an extern declaration #define DOC extern #endif // Now the "Public" Symbols PUBLIC char tom; PUBLIC int dick; PUBLIC long harry; main.c // Create Public definitions #define DO_MAIN_DEFINITIONS 1 #include "main.h" // Will make definitions other.c // Create declarations to access the "Public" symbols from main #undef DO_MAIN_DEFINITIONS #include "main.h" // Will make extern declarations |