Hi AlI,
I have a class called Rectangle that contains a public method:
I have a nother class called Components that is a subclass of Rectangle.
From a totally different class, Compund, I now want to loop through a vector<Componen t*> and call the method contains with the appropriate arguments.
I get an error telling me:
It's probably real obvious, I'm not that good with c++.
Any ideas?
Cheers
I have a class called Rectangle that contains a public method:
Code:
bool contains(int x, int y);
From a totally different class, Compund, I now want to loop through a vector<Componen t*> and call the method contains with the appropriate arguments.
I get an error telling me:
Code:
../Rectangle.h:11: `bool Rectangle::contains(int, int)' is inaccessible ../Compound.cpp:43: within this context
Any ideas?
Cheers
Comment