Hello
I am studying for my exam & I came across this question that is stumping me.
class X
{
public:
X();
private:
int x1, x2;
};
class Y : public X
{
public :
Y();
private:
int y3;
} // the class Y does not end in an '};' but just a } maybe thats a typo or its meant to be like that
Question:
Describe the kinds of operations which would be implemented in function Y();
I know what constructors are & I recognise that X(); & Y(); are default constructors BUT I have never seen this before class Y : public X
What does that mean?
Does it mean,an object of class Y can be accessed by an object of class X because the class Y is a public 'element/function?' of class X??