I didn't actually inspect the files you attached, but the error you get suspiciously looks like the two .h files (or any other two .h files) are including each other mutually and don't contain #include guards or #pragma once directives. Could that be the case?
BTW, mutual inclusion often is a sign of bad design and can indicate problems (maybe still to come) aside from this error message.
HTH
Ah, and... Welcome to CodeGuru!
Last edited by Eri523; December 23rd, 2010 at 07:51 PM.
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.
The problem is the circular inclusion, as Eri523 suspected: ParkingTicket_h.h includes PoliceOfficer_h.h which includes ParkingTicket_h. Placing the entire header within those include guards is correct, but will not solve this problem.
Observe that ParkingTicket has a PoliceOfficer member variable. Therefore, ParkingTicket needs the definition of PoliceOfficer, so you should include PoliceOfficer_h.h in ParkingTicket_h.h. But PoliceOfficer only has member functions that need ParkingTicket, so a forward declaration of ParkingTicket will suffice in PoliceOfficer_h.h. You can include ParkingTicket_h.h in the source file that implements the PoliceOfficer class.
C + C++ Compiler: MinGW port of GCC
Build + Version Control System: SCons + Bazaar
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.