Intellisense not working with abstract class Follow
When I create an inherited class
For example :
class Base {public: virtual void foo() = 0;};
class Derived :public Base{void foo() override { }}
std::vector < Base > Objects; // <-- This does not error here even though the base object cannot be constructed.
std::vector < Base* > Objects; // <-- This is the right way to do it.
Please sign in to leave a comment.
Using inheritance, we have to write the functions only one time instead of three times as we have inherited rest of the three classes from base class (Vehicle).