Would you be so kind and help me solve this problem?
#include <string>
using namespace std;
class Okno {
protected:
int x1,y1,x2,y2;
string nazwa;
public:
};
class NieDesktop : public Okno{
private:
Okno& ojciec;
NieDesktop(const NieDesktop&);
};
class OknoWlasciwe : public NieDesktop{
OknoWlasciwe(const OknoWlasciwe&);
public:
OknoWlasciwe(Okno&,int,int,int,int,string);
};
OknoWlasciwe::OknoWlasciwe(Okno& _ojciec,int _x1,int _y1,int _x2,int _y2,string _nazwa)
:ojciec(_ojciec){
x1=_x1;
y1=_y1;
x2=_x2;
y2=_y2;
nazwa=_nazwa;
}
It doesn't compile. Compiler says that the line 23 causes problems and I don't know why. It says class OknoWlasciwe has no member called ojciec and how come?? I mean, OknoWlasciwe is a public subclass of NieDesktop, which has such a member, so I thought it had it too...