|
I think the best way for you to find whats wrong in these cases is to learn to use the debugger. Failing that, you should add cout statements in important places in your code, so that you can see what the values of certain variables are.
Note that in this case, your operator * is changing the values of the height and width member variables of the current object. I'm pretty sure you don't want to be doing that.
|