Edit: And in case you don't understand why this is a problem, the compiler thinks that your cdBox class is being redefined because even after the first time you #include your cdBox header file, "_cdBox_h_" is still undefined, so it will go through all the code in that header file again, each time you wrote #include "cdBox.h" somewhere else.