Hello All,
I have fooComponent class inheriting Timer,
fooComponent:: private Timer
{}
And I am using the fooComponent foo in MainComponent.h ,
I’m getting an error of fooComponent’: cannot instantiate abstract class
I’ve implemented the void timerCallBack() in both fooComponent and MainComponent
but not understanding where should I call startTimer(); in MainComponent
You might have misspelled the function name in your code. It’s timerCallback.
The override keyword can help to avoid this sort of problem. If you always add override to overridden virtual functions, the compiler will inform you if it can’t find a suitable base class function to override.