Posted on 2002-07-18
This may seem like an "obvious" or "beginner" question, but I've had no formal training in C++ programming, and I can't find any good information about this particular topic.
I create two classes, ie: A Person class and a Car Class.
Each person will own two cars.
The car class will have a very small number of member variables (2 or 3), but a large number of functions (20 or 30).
There will be a large number of Person classes created at one time during the program, so there will be twice as many car classes created (2 for each person).
My question is: How can I determine the memory footprint (not necessarily exactly, but generally) that is going to be taken up by each car class. If it is going to be heavy because of all the functions, I want to find a different way of going about the whole process.