class base
{
public:
base(int passZ);
private:
int z;
};
class subBase: virtualpublic base
{
public:
subBase(int passY int passZ);
private:
int y;
int z;
};
class subSubBase: virtualpublic subBase
{
public:
subSubBase(int passX, int passY, int passZ);
private:
int x;
int y;
int z;
};
The above are the 'prototypes' the below are the constructor definitions:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
base::base(int passZ)
{
z=passZ;
}
subBase::subBase(int passY, int passZ):base(passZ)
{
y=passY;
z=passZ;
}
subSubBase::subSubBase(int passX, int passY, int passZ): subBase(passY, passZ)
{
x=passX;
y=passY;
z=passZ;
}
When I compile it it doesn't seem to work. Any ideas?