Why do I get the error "No default constructor exists for class "Sub", even though I have the constructor for Sub class"
class Base{
private:
int x;
public:
Base(int number)
{
x = number;
}
virtual void print(void) = 0;
};
class Sub: public Base{
public:
Sub(int x): Base(x) {
}
void print()
{
cout << "Testing" << endl;
}
};