Hey Guys,
In my program I have two classes in two different header files. Each class has a pointer to the other class in it, so when I include the header in each file I get an error stating there's a previous definition of the class. Is there a way around that? Possibly with #ifndef?
Ok, after some research I've found that adding headers into the .cpp files and using forward declarations in the headers is the best way to go. Does that sound right?
Header guards should work. If your not sure why they work it's simple: When you define something it's defined in your compiler. If it checks for that defined object again and it's already defined it will not include the remainder of the file.