Ohh.. so you dont have the entire class and so :O Can i declarate them separately? No eh?
I have the problem that 2 classes CLIENT , CORPORATION are mutually linked in methods calls between them so I have the question "Which to put first??" :( :( :(
Can we see your implementation. I can think of a few ways to go about this but some are more relavent then others depending on what specifically "links" the two classes together.
*and the VECTOR <* OFFICES>; is located to CORPORATION. But CLIENT needs of course to chose one from the Offices for his entrance
So the includes
#include "CLIENT.H"
#include "OFFICE.H"
#include "CORPORATION.H"
Work for CORPORATION ableing it to acess and create OFFICES and CLIENTS
BUT CLIENTS can't choose offices cause OFFICE type is unkwonw yet and cant even be passed in a CLIENT method to printout them at least. ^^
And of course CLIENT neither can call CORPORATION.Show_Offices()
Sorry I deleted my last post because I went off on some tangent. Anyway, You have three objects OFFICE, CLIENT and CORPORATION. OFFICE appears to be a list that is held in CORPORATION that you want CLIENT to be able to choose from. So the first thing is to do is make sure that the OFFICE list is a public data memeber and that Show_Offices() is also public so that CLIENT can reach them. It doesn't appear that CORPORATION needs to have CLIENT.H included but you will need OFFICE.H and CORPORATION.H included in CLIENT.H. Your CLIENT object needs to have a function that can except a CORPORATION object as an argument so that it can call the "Show_Offices()" member function. Is this possible so far?
Your CLIENT object needs to have a function that can except a CORPORATION object as an argument so that it can call the "Show_Offices()" member function. Is this possible so far?
You should declare CLIENT last, I say this because nothing you've indicated so far tells me that either OFFICE or CORPORATION need to know anything about CLIENT. So CORPORATION.H should include OFFICE.H and CLIENT.H should include CORPORATION.H unless there is something preventing this.
I've yet to see "the only solution for X" in C++. But IMO this would be the easiest since the CORPORATION object has both lists in it's memory space.
I tend to avoid forward declarations so I wouldn't know all of the limitations. It makes sense though that the compiler would not know what functions it has.