Ok, now that I'm at work I took another look at this thread and it seems that what rypyr mentioned is what I need. I'll give an update when I can try it out tonight.
In response to alnite:
I was just using "AddControl()" as an example that I need to include "Ship" in "Player" so I can run "Ship" member functions - More specifically, "AddControl()" would be used like "myShip->AddControl(THRUST);" after "Player" gets the inputs from the input handlers.
The other questions you asked go hand in hand - When I forward declare "Player" in "Ship", I can then give "Ship" a pointer to a Player as a member. It doesnt, however, let me use functions of that member. I can't say "myPlayer->anything();", and I assume it is because "Player" is only forward declared, not actually "truely included".
Thanks for the help so far guys
*EDIT* Response to Ishan:
I said before that I understand why I can't do it literally, but that I want achieve the same effect doing so would have. Simple form of what I want to do in case you don't want to read the description I just put up:
I have classes Player and Ship. Not only do they need to know OF eachother, they need to be able to access the data members of eachother (something forward declaration doesn't let you do). For example, Player needs to know of and directly effect Ship it owns (control it) and Ship needs to know the information thier Player holds to determine how it moves (each Player has unique statistics that control thier ships: movement speed, turn rate, etc).
What I need is a method that will allow me to access the data equally back and forth without making accessor class "C" which seems very ugly and cumbersome (to me anyway). But as I said, rypyr seems to have given me the answer I was looking for, which I will try tonight when I get home
.
[edited by - neonfaktory on May 1, 2003 2:33:09 PM]