I'm trying to do multiple levels of inheritance and call the base constructor however the complier cannot find my base constructor..
no overloaded function takes 8 arguments
where have I gone wrong in my code?
The .cpp for my base class constructor defaults 10 member variable ints to 0
Baseclass::Baseclass(void) : m_1(0),m_2(0),
m_3(0),m_4(0),
m_x(0),m_y(0),
m_5(0),m_5(0),
m_7(0), m_8(0)
{
}
Baseclass::Baseclass(int _1,int _2,int _3, int _4, int _5,int _6, int _7, int _8)
: m_1(_1),m_2(_2),
m_3(_3),m_4(_4),
m_x(0),m_y(0),
m_5(_5),m_6(_6),
m_7(_7), m_8(_8)
{
}
and in my first subclass header I have
class SubclassA:
public Baseclass
{
public:
SubclassA(void);
using Baseclass::Baseclass;
~SubclassA(void);
follow by the second subclass having:
class SubclassB:
public SubclassA
{
public:
SubclassB(void);
using Baseclass::Baseclass;
~SubclassB(void);
I would then try to initialise a new instance of this class with:
SubclassB(Id,0,100,100,10,100,1,1)
I was unsure if using SubclassA::SubclassA;
for be valid inside SubclassB but it didn't fix the problem anyhow.