Basics Of OOPS In C++ | Classes & Objects In C++
Basics Of OOPS In C++ What is Class? Class is like a form in programming. You know in a form you have some fields where every user fills that form. So the one form template can be filled by any user. The class can be assumed as a generalized set of programs whereas many objects can access the features of that class. You can understand class by this image easily:- Here in this example, you can see a template of a car that can be accessed by many car companies like polo, mini, beetle etc. So here polo, mini, beetle are called objects which is an instance (user) of car class. A class may have data members (attributes) and methods (functions) like the structures you can understand this concept by this image - So here car class has methods and attributes so the objects of this class should have access to these methods and attributes. Access Specifier In OOPS C++ - public - members are accessible from outside the class private - members cannot be acce...