Why we use object . Then member function as it may be not necessay that they are made to update the data memeber of object.
Will memeber function are seperate for each object
Why we use object . Then member function as it may be not necessay that they are made to update the data memeber of object.
Will memeber function are seperate for each object
Hey Mayur, A class is just a blue print. For eg.
there a class Car having different data members such as name, speed, color, price
Now, as your can see this class Car is a blue print of a normal car because name, speed, color, price are the features of every car, but value for these features are not same for every car, so now we make object of this class car to show the different cars. for eg.
So, car a,b,c are objects of class car which represents 3 different cars and and having the different values for their features.
I hope your doubt is clear now 