sir my question about objects.
fruit is a class.mango is object.in c++ class do not have memory.
but object has memory.this is my knowledge about class &objects.
now my question is what is meant by"object is a primary run time entity of class".?
sir please explain indetail

Hello Phaneendra.

What you say about class and objects is correct. I could add another analogy. A class is like the plans for a building, and an object is like the physical building. Objects take up memory, like buildings take up space. Many objects can be made from a class just like many buildings can be made from a plan.

I think the sentence "object is a primary run time entity of class" is trying to say the same thing in a fancy way. It means that when a program is running the class definitions are used to create objects. It is the objects which take up space in the computer memory and do the work. I would rewrite the sentence as "object is the run time instance of a class". I don't know what the author means by the word "primary", as I do not know what a "secondary" entity would be.

I hope that helps you.
Best regards


All Answers

Answers by Expert:

Ask Experts




No longer taking questions.


No longer taking questions.

No longer taking questions.

©2017 About.com. All rights reserved.