What are virtual functions in c++, C/C++ Programming

A virtual function permits derived classes to replace the implementation given by the base class. The compiler makes sure the replacement is always known as whenever the object in question is actually of the derived class, even if the object is accessed by a base pointer rather than a derived pointer. This permits algorithms in the base class to be replaced in the derived class, even if users don't know about the derived class.                

 

 

Posted Date: 4/8/2013 5:52:24 AM | Location : United States







Related Discussions:- What are virtual functions in c++, Assignment Help, Ask Question on What are virtual functions in c++, Get Answer, Expert's Help, What are virtual functions in c++ Discussions

Write discussion on What are virtual functions in c++
Your posts are moderated
Related Questions
Write a program to count the prime number in array

There is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides. But he sometimes mistakes doing that

in this problem you are given a board in which some of the elements are placed as shown in below diagram.each element represent a color.fill the other element in the board,such tha

Molecular dynamics for a Lennard-Jones system (in C++) 1. Write a function which reads in the input variables of a molecular dynamics simulation of a Lennard-Jones system. The inpu

Create an applet that bounces a blue ball inside an applet using Thread. The ball (diameter is 10) will start at position (0,0). When the ball hits the edge of the applet, the ba

Ask question #M i want to undersatnd about tree structures like node leaf etcinimum 100 words accepted#

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

b) The static keyword let a variable to maintain its value among distinct function calls. If the value of a static variable alters while the variable has been accessed, variable

how to make program c++

I have a mini project where I need to write a code .wonder if someone can help me.I already have the forms and webmaster page done just need to code portion