Top "Virtual" questions

An extensible or simulated artifact

Are abstract methods and pure virtual functions the same thing?

As far as I know, both abstract methods and pure virtual functions do NOT provide any functionality ... So can we …

c++ function virtual
What does 'has virtual method ... but non-virtual destructor' warning mean during C++ compilation?

#include <iostream> using namespace std; class CPolygon { protected: int width, height; public: virtual int area () { return (0); } }; class CRectangle: …

c++ polymorphism virtual
Calling derived class function from base class

class base { public: virtual void start(); virtual void stop(); void doSomething() { start(); .... stop(); } } class derived : public base { public: void start(); …

c++ inheritance virtual
C++ Virtual template method

I have an abstract class (I know that it will not compile this way, but it's for comprehension of what …

c++ templates virtual
navigation property should be virtual - not required in ef core?

As I remember in EF navigation property should be virtual: public class Blog { public int BlogId { get; set; } public string …

c# entity-framework virtual entity-framework-core navigation-properties
C++ virtual function from constructor

Why the following example prints "0" and what must change for it to print "1" as I expected ? #include <iostream> …

c++ oop class constructor virtual
Overriding vs Virtual

What is the purpose of using the reserved word virtual in front of functions? If I want a child class …

c++ function virtual overriding
override on non-virtual functions

The C++11 FDIS it says If a virtual function is marked with the virt-specifier override and does not override a …

c++ attributes overriding virtual c++11
C# enum in interface/base class?

i have problem with enum I need make a enum in base class or interface (but empty one) class Base { …

c# enums virtual parent
Override number of parameters of pure virtual functions

I have implemented the following interface: template <typename T> class Variable { public: Variable (T v) : m_value (v) {} …

c++ interface virtual overloading