+ 1
Can you use sizeof on a class? If so, does only depend on its primitive values or does inheritance play a part as well?
3 Answers
+ 8
sizeof works on objects. It returns the size occupied by the object in memory. So, all the data connected with the object is taken into account.
0
Yes.....We find these in file handling.....when we started saving information by classes
0
yes it depends on inheritance....because it is accessing data from them