Talk:Virtual class

Example?
I have removed the C++ example which was in fact not valid C++ (there are no virtual classes in C++, only virtual functions and virtual base classes). Does anybody have a working example in a different language? Phst (talk) 11:57, 19 March 2015 (UTC)


 * Phst There is no virtual base class, only virtual inheritance. Virtual inheritance--Diaspomod (talk) 12:57, 4 May 2019 (UTC)

In my opinion, the title is wrong. Not the class itself can be virtual, just the class methods! I have removed the virtual modifier in the c ++ example and can now be compiled with the clang compiler (but not before). The complete article must be overwritten. Currently the nested class is extended without virtual functions! This is bad!--Diaspomod (talk) 12:14, 4 May 2019 (UTC)

When I explicitly add the override modifier, the compiler complains about the non-virtual functions. As a conclusion, there is no such thing as a "virtual class" in C++.

This is the error message from clang that uses the explicit override modifier. --Diaspomod (talk) 12:43, 4 May 2019 (UTC)

We should delete this article or write that there are no virtual classes, just virtual methods in a class. In this fact, it does not matter if the class is nested or not.--Diaspomod (talk) 12:50, 4 May 2019 (UTC)


 * Many academics writing independent reliable sources disagree with you. A couple of the many papers that write about this are and . Phil Bridger (talk) 10:51, 3 February 2020 (UTC)

Virtual class
What is vitual class 2400:1A00:BB20:AEC7:454E:5FDE:4030:F4E4 (talk) 12:04, 20 February 2024 (UTC)