Top "Virtual" questions

An extensible or simulated artifact

Why not make everything 'virtual'?

Possible Duplicate: Why C# implements methods as non-virtual by default? I'm speaking primarily about C#, .NET 3.5, but wonder in general …

c# .net virtual overriding
Is it possible to declare a virtual static constant value in a C++ class?

I'd like to have a base class that has a constant field (like an unique ID associated with the class …

c++ inheritance virtual constants static-members
How to limit memory of a OS X program? ulimit -v neither -m are working

My programs run out of memory like half of the time I run them. Under Linux I can set a …

macos memory virtual launchd ulimit
Interview question about virtual functions in C++

I was asked this crazy question. I was out of my wits. Can a method in base class which is …

c++ virtual
C++ Virtual function being hidden

I'm having a problem with C++ inheritance. I have a class hierarchy: class A { public: virtual void onFoo() {} virtual void …

c++ inheritance virtual
When should you call base.Method() in overridden method, and how to mark this when you write code in team?

When using some framework/api, sometimes it's pretty unclear if you must call base.Method if you override it, for …

c# overriding virtual
C++ Interview: vtable for a class with a pure virtual function

I was asked this interview question today!! (it was a really awkward telephonic interview..): What is the difference between the …

c++ virtual vtable
Understanding virtual base classes and constructor calls

I'm a bit confused about how virtual base classes work. In particular, I was wondering how the constructor of the …

c++ virtual multiple-inheritance base-class
Can I get polymorphic behavior without using virtual functions?

Because of my device I can't use virtual functions. Suppose I have: class Base { void doSomething() { } }; class Derived : public Base { …

c++ function polymorphism virtual overriding
Force calling base class virtual function

I have some events like this class Granpa // this would not be changed, as its in a dll and not …

c++ class function inheritance virtual