First, whether you use classes or functions is irrelevant to your problem. Even if you don't use classes (as encapsulated classes with methods) you may still want to use structures. In fact, you arguably will at some point.
The idea is this - you've got type definitions and object definitions. Objects are functions and variables. I assume that you are acquainted with those. Objects can be put in separate files and compiled there and later linked to their points of reference during the linking stage. Since in the header files you only need to declare them (not define them), multiple inclusions cause no trouble. This is because several declarations do no harm. Several definitions do.
Structures and classes (whether OO or procedural style) on the other hand need to be defined in every translation unit (corresponds to preprocessed .cpp file) that uses them. Exception is made for the translation units that exclusively (and solely) use those types in pointers and references. Then declarations without definitions are acceptable. It is called forward declaration of the structure or class. But otherwise you need to provide definition, and only one definition of a structure or class. Multiple definitions due to multiple inclusion result in error.
So, how do you protect against multiple inclusion. You use the following preprocessor idiom:
1 2 3 4
|
#ifndef SOME_ARBITRARY_NAME
#define SOME_ARBITRARY_NAME
//header stuff goes here
#endif
|
Usually SOME_ARBITRARY_NAME is derived from the header name somehow, like HEADER_NAME_H.
Regarding the use of OO. First, OO is very good thing, but if someone else does it for you. It is unbelievably (almost insanely) difficult. Consequently, it is sometimes counter-productive for small short-term projects, especially if you have no previous experience with the problem domain. But if someone asks me, "should I give you generic OO library or a C-style one," I would virtually always choose the former. When you acquire experience, your OO designs become better, more elegant, more polished, much more reusable, and you will start to like it more. But if you use it as programming with classes, as I suspect you do (no offense intended), than there is no advantage, except the exercise. Which is arguably desirable on its own.
Regards