Question: "Virtaul" C++ subroutines? Can someone please explain what the heck "virtual" means when placed in front of a C++ subroutine definitions. I read an online tutorial, bust it just doesn't make sense!

Answer: It means that the declaration of that function is missing. It should be defined by the child objects.\n\nFor example if you have a class called geometricobject you can put a virtual function called ComputeArea() withouth writing any code to it. When you define some child classes like triangle or square you need to write specific functions CumputeArea that compute the area.\n\nPS: I think it's called virtual.
This question from the Yahoo Q&A forum is categorized in the topic: Education & Reference