if i have
Code://blah.h class operation { public: operation(); virtual int performCalculation(int a, int b); }; //and then i have all the different types of operations that i can do like plus, minus, multiply class plus: public operation { public: int performCalculation(int a, int b); };
now why is it that im getting errors
[code]
blah.h:12: error: base `operation' with only non-default constructor in class
without a constructor
and line 12 is the line
can i not have a constructor for my plus class? or is it better to have one? and even if i do make one whats the purpose when all i want to do is just a+b .. whats a constructor going to do ?Code:class plus: public operation {