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.

 
by Dinesh Thakur Category: Classes in C++

Member of a class can be accessed only through the object of a class. The members are accessed as follows:

 

Page 5 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