Difference between objects and instances. | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Difference between objects and instances.

In c++, are there any differences between objects and instance of a class or are they same ?

28th Dec 2020, 5:26 PM
Adarsh Suman
Adarsh Suman - avatar
3 Respostas
+ 4
Object of class and instance of class have same meaning they both refer to the object of the class you have made, You also have instance fields and instance methods both require an objevt before they can used. You also have class fields and class methods which are bound to the class rather then then the instance of class
28th Dec 2020, 11:16 PM
D_Stark
D_Stark - avatar
+ 1
An object is an instance of a class, and may be called a class instance or class object. (Wikipedia)
28th Dec 2020, 5:49 PM
Bahhaāµ£
Bahhaāµ£ - avatar
+ 1
They are the same in C++.
28th Dec 2020, 8:32 PM
Ore
Ore - avatar