Hello .
I wanna ask About operator "sizeof" at function
[fstreamObject.write( reinterpret_cast < const char*> (&client) , sizeof ( ClientData) ) ; ]
-ClientData is a class I created , and client is an object of this class.
-why the sizeof Operator argument sizeof(ClientData) represents the whole class not only the object [ sizeof(client) ] ??
Thank You..
Any object of a class has the same size as the class itself. Class is a definition of all its objects.
Last edited on