What does it mean to declare a member function as a virtual, C/C++ Programming

Assignment Help:

What does it mean to declare a

1.      member function as a virtual

A:

(a) C++ virtual function is member function of any class, whose functionality may be over- ridden in its derived classes. The entire function body might be replaced along with a new set of implementation in derived class. The concept of c++ virtual functions is distinct from C++ Function overloading. The difference among a virtual member function and a non-virtual c++ member function is, the non-virtual member functions are determined at compile time. This mechanism is called as static binding. Whereas the c++ virtual member functions are determined during run-time. This mechanism is called as dynamic binding.

 

 


Related Discussions:- What does it mean to declare a member function as a virtual

Fraction coding, Create a program that asks the user for two integers which...

Create a program that asks the user for two integers which represent the numerator and denominator parts of fraction. Print out a simplification of the fraction. Example: Enter th

Give advantage of using nfs, Question: a) Give two uses of NFS. b) G...

Question: a) Give two uses of NFS. b) Give one advantage of using NFS. c) Explain the following lines as they would be interpreted in the /etc/exports file i. /usr/local

Write a program that predicts users age, Write a program that predicts user...

Write a program that predicts users age: Write a program that predicts users' age (0-128 years old) with at most 7 questions. The game starts with asking the user whether he/s

Program to calculate gross pay and tax payable, Study the following table u...

Study the following table used to compute the tax payable by employees in certain organization   Gross Pay                                  Fewer than Three             Three

Sums a sequence of integers, assume that the first integer read with cin sp...

assume that the first integer read with cin specifies the number of values remaining to be entered. that program should read only one value each time cin is executed .a typical inp

Define the bitwise operators in c language, Define the Bitwise Operators in...

Define the Bitwise Operators in c language? C has distinction of supporting special operators that known as bit wise operators for manipulation of data at bit level. These oper

Data structure, convert BST into sorted doubly linked list

convert BST into sorted doubly linked list

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd