Default virtual behavior of methods is opposite in C++ and Java: In C++, class member methods are non-virtual by default. They can be made virtual by using virtual keyword. For example, Base::show() is non-virtual in following program and program prints “Base::show() called”. #include
Read full article from How does default virtual behavior differ in C++ and Java ? | GeeksforGeeks
No comments:
Post a Comment