C++ Preprocessor #ifdef #ifndef confusion

I've read everything about them but my compiler is still freaking out about this stuff.


Here is a big question:

when i say

#ifndef _EXAMPLENAME_H_
#define _EXAMPLENAME_H_

//code here

#endif


what is the token for? I don't see a reason for the token to exist! WHAT DOES IT DO? AAAAAAAH SO CONFUSING.

My compiler gives me errors depending on which files use #ifdef and which ones use #ifndef. I have a hard time picking which one to use. I don't understand at all even after reading about this stuff for the past hour.

Help?
Topic archived. No new replies allowed.