0 votes
in C Plus Plus by

What is the difference between an Object and a Class?

1 Answer

0 votes
by

Class is a blueprint of a project or problem to be solved and consists of variables and methods. These are called the members of the class. We cannot access methods or variables of the class on its own unless they are declared static.

In order to access the class members and put them to use, we should create an instance of a class which is called an Object. The class has an unlimited lifetime whereas an object has a limited lifespan only.

Related questions

+2 votes
asked Jun 19, 2019 in C Plus Plus by anonymous
+2 votes
asked Jun 19, 2019 in C Plus Plus by anonymous
...