What is a Class and Object in C++?

前端 未结 20 1011
走了就别回头了
走了就别回头了 2020-12-09 10:33

What is a Class and Object in C++?

Can we say that a Class is an Object?

20条回答
  •  难免孤独
    2020-12-09 11:11

    A class is a logical construct while object is its physical copy.

    A class can be thought of as a mould from which multiple objects are created which appear identical to the class

    Objects can be thought of as carbon copies of the class. A perfect example of inheritance principle.

    A class can be thought of as a parent of its children - objects

提交回复
热议问题