What are objects ? What is common between all objects of a class ?

 
 

Objects are physical or conceptual things that are found in the universe. Objects are thought of having state associated with them. E.g. state of an account would be the account balance; the state of a clock would be the time.
In object oriented terminology a class is just a plain structure and an object is an instance of a structure. A class is a blueprint that does not take memory however when a class is instantiated by creating an object of that class then each such object takes up memory space.
All objects of a class have identical structure however each object will have its own private data. E.g. a class student will have multiple instances of students where each student instance will have distinct values for their attributes.
Each object will have its own memory with its data however all the objects of a class share the member functions of a class.
E.g. we will define a class called account and create two objects of this class.

class Account
{
	private:
	double account_balance;
	int account_no;
	public:
	double calculateInterest();
	void deposit(double);
	double withdraw();
}

Create objects of account in the following way:
Account account1, account2… accountn;

Re: What are objects ? What is common between all objects of a c

What is common between all objects of a class
If a class has virtual functions, all the objects of that class will have a virtual pointer. This pointer will contain the address of Virtual Table(VTABLE) for that class.
This address of the VTABLE is common to all the objects of the class.
This address is stored in the first 4 bytes of an object.