06-04 HeaderTemplate
From Manuals
(Difference between revisions)
(Created page with 'This example demonstrates the use of a header file and C/C++ preprocessor and preprocessor directives. /* Program Example 6.4: Template for .h header file …') |
|||
| Line 11: | Line 11: | ||
#endif // end of the if directive | #endif // end of the if directive | ||
| + | /* Program Example 6.4: main.cpp | ||
| + | */ | ||
#include "header.h" | #include "header.h" | ||
Current revision as of 15:43, 14 August 2014
This example demonstrates the use of a header file and C/C++ preprocessor and preprocessor directives.
/* Program Example 6.4: Template for .h header file
*/
#ifndef VARIABLE_H // if VARIABLE_H has not previously been defined
#define VARIABLE_H // define it now
// header declarations here…
#endif // end of the if directive
/* Program Example 6.4: main.cpp
*/
#include "header.h"
main() {
}
