I am on a giant project(school) and I use inheritance.
I have this base class from which several classes are inherited. A function is written in base class which requires the size of the called object. At the time of coding of the function, the size is unknown as the function may be called by objects of different derived classes.
Until now, I have beeen passing the size as an argument, but it's getting too complicated. Any way around?
I'm weak at pointers, but can I somehow get the size of the object pointed by 'this' pointer? How do I write the statement?