I have doubt using the keyword "virtual". In C++ if I create a pure virtual function then the derived class has to implement it. If the derived class does not declare the pure virtual function with the keyword "virtual" the MVC++ does not warn me about it. But if I had the keyword virtual in the derived class it still doesn't make any difference.
Here is a sample code:
I want to know if there is any difference using / not using the virtual keyword?Code:class A { public: A(); virtual ~A(); virtual void A::op() = 0; }; class B : public A { public: B(); virtual ~B(); void op(); // doesnt make any difference if I have virtual or don't have it. };