As most of you know, you will get 'Fuction already defined' or 'Class already defined' errors if a self-made header is included more than once in a project. The way I have been preventing this thus far is to use a structure like this:
This feels a bit hackish to me. Is there a better way to do it, or how do you personally prevent multiple input from your headers? Thanks for your time.Code:#ifndef MY_HEADERNAME_HEADER_INC //All of the function protos, classes, etc. #define MY_HEADERNAME_HEADER_INC #endif