header files inside header files

Hi,

I'm getting quite confused on which ones need what, so I include all header files in every single file, (.cpp and .h).

is this okay?

I suddenly thought, if example.h was pasted in example.cpp, but it's also pasted in example2.h, example3.h, example4.h ... which are also pasted in example.cpp, etc. etc. won't the guards prevent the paste?

getting my functions undefined, :(
Thanks a lot!
Yes that is potentially problematic.

See section 6 of this article for an example of how it might bite you in the butt:

http://www.cplusplus.com/forum/articles/10627/#msg49680
Topic archived. No new replies allowed.