Minggu, 01 Januari 2017

What are the Rules to implement Virtual Functions

Following points must be remembered while working with virtual functions: Virtual functions must be members of a class. Virtual functions must be created in public section so that objects can access them. When virtual function is defined outside the class, virtual keyword is required only in the function declaration. Not necessary in the function definition. Virtual functions cannot be static members. Virtual functions must be accessed using a pointer to the object. A virtual function cannot be declared as a friend of another class. Virtual functions must be defined in the base class even though it does not have any

The post What are the Rules to implement Virtual Functions appeared first on Coding Security.


What are the Rules to implement Virtual Functions
read more

Tidak ada komentar:

Posting Komentar