Hi guys,
Ok, so I'm a bit stuck. I'm creating a program that has 3 classes. An object of one of the classes needs to be made up from 2 objects from one of the other classes.. and I can't figure out how to do it.
for example, if I have:
class Room{
private:
char name[];
int length;
// etc etc
public:
void some_function
and the I have..
class House{
..whos attributes are 2 'Rooms'. How would I do this?
If I try..
class House[
private:
Room 1;
Room 2;
// etc
..I get a compilation error telling me that 'Room' does not name a type!
I need to be able to send the parameters to the 'House' constructor, that will allow me to create 2 objects of type 'Room' within the class House.
Any help would be v.gratefully received!
Thanks in advance.