1.Three objects are there of a single class.suppose a1,a2,a3.
There is a statement in main function like a1=a2=a3.
but question what mechanism i will folllow so that value of a3 will not come a1.but value of a3 will come to a2.
2.why static function can only access only static variable in c++.
I have no idea about 1 and if you get any then do inform me at email@example.com
for 2, static things are not any object specific. They are class-specific. They are created well-before any object of that class is created. So if you try to access any non-static member variable from the static function then this could create the issue as you could use the static function from outside (without using any object and also before any object is created). There could be no way of knowing which object you are refering to (first case) and there would be no object (case 2).