I am trying to define an inherited class CheckMyArray
which inherits from InitMyArray
however it keeps coming up with
CheckMyArray.cp p: In method `CheckMyArray:: CheckMyArray(in t)':
CheckMyArray.cp p:6: no matching function for call to `InitMyArray::I nitMyArray ()'
InitMyArray.h:1 5: candidates are: InitMyArray::In itMyArray(int)
InitMyArray.h:1 6: InitMyArray::In itMyArray(int, int)
InitMyArray.h:2 5: InitMyArray::In itMyArray(const InitMyArray &)
make: *** [CheckMyArray] Error 1
My code for Init and Check is
//child class of InitMyArray
#ifndef CHECKMYARRAY_H
#define CHECKMYARRAY_H
#include "InitMyArra y.h"
class CheckMyArray : public InitMyArray
{
private:
int cVal;
public:
CheckMyArray(in t);
void put(int, int);
};
#endif
#ifndef INITMYARRAY_H
#define INITMYARRAY_H
#include "MyArray.h"
class InitMyArray
{
private:
int arrSize;
int arrVal;
public:
/*constructors*/
InitMyArray(int );
InitMyArray(int , int);
/*Destructors*/
~InitMyArray();
/*member functions*/
int get(int);
int getSize();
};
#endif
please help, Im cant seem to figure this out.