Hello!!
Well, tried to cram in as much info as I could to the topic. Lets see if someone got it
I have this:
class cWarehouse
{
cWarehouse();
// stuff
cStorage m_Storage;
cAutoTruck m_AutoTruckSolo;
cAutoTruck m_AutoTrucks[5];
};
Both my cStorage and cAutoTruck has a constructor that takes one parameter, a cWarehoue pointer. This because I want them to know who "owns" them, and so they can access their "brothers".
Well, this works:
cWarehouse::cWarehoues()
: m_Storage(this), m_AutoTruckSolo(this)
{
// stuff
}
But how do I do the same with the array of cAutoTrucks??? I''ve tried everything... (well, aparently not everything since it''s not working. Assuming there IS a way to make it work..)
And yes I know I could do a cAutoTruck::SetWarehouse(cWarehouse* p_pWarehouse), but I don''t want to!
Please help!
Thanx...
"No lies of sugar can sweeten the sournes of reality"
}+TITANIUM+{ A.K.A. DXnewbie[onMIRC]