It's a guard against including the information in the header file more than once(which can cause a mess with redeclarations etc.).
You'd put the contents of your header between lines 2 and 3. At first pass if this symbol Test_h is not defined, processing goes to line 2 which defines Test_h and then continues with the rest of the header until the endif.
If you include this file again somewhere and that symbol is found to be already defined the preprocessor hits line 1 and skips to line 3 since the ifndef is false.
Last edited by jonsca; Feb 21st, 2010 at 6:10 am.
Reputation Points: 1165
Solved Threads: 578
Quantitative Phrenologist
Offline 4,271 posts
since Sep 2009