by Dinesh Thakur Category: Classes in C++

In the Inheritance when we Points or Pass the Reference of Second Class Object into the Pointer Object of First Class , then the Pointer object of first class will call only the Constructor of Sub Class But Destructors are not Called With the help of Base Class Pointer Object. Because the Statements or Destructors of Base Class are never Override.

 
by Dinesh Thakur Category: Classes in C++

#include <iostream.h>

#include<conio.h>

 
by Dinesh Thakur Category: Classes in C++

The member functions are created and placed in the memory space only once when they are defined as a part of a class specification. Since· all the objects belonging to that class use the same member functions, no separate space is allocated for member functions when the objects are created. For each object, memory is allocated only for member data. Separate memory locations for the objects are essential since the member variables hold different data values for different objects.

 
by Dinesh Thakur Category: Classes in C++

The difference between a structure and a class is that, in a class, the member data or functions are private by default whereas, in a structure, they are public by default. The following segment

 
by Dinesh Thakur Category: Classes in C++

A class is a user-defined data type that binds data and the functions that operate on the data together in a single unit. Like other user-defined data types, it also needs to be defined before using its objects in the program. A class definition specifies a new data type that can be treated as a built-in data type.



 
by Dinesh Thakur Category: Classes in C++

Virtual functions play an important role in object oriented programming. Ordinary functions use the concept of early binding. However virtual functions help in late binding. The concept of pointers playa vital role in Virtual functions.

 

Page 4 of 6



About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.



Related Articles