So let's say I have a program like this:
class Object {
public:
Object();
~Object();
void foo();
};
Object::Object() {/** ... */}
Object::~Object() {
PrintOutMessageToCommandPrompt();
}
int main() {
Object object;
object.foo();
}
This is basically what's happening in my current project. However, PrintOutMessageToCommandPrompt() is never called. If instead I do this:
int main() {
Object* object = new Object();
object->foo();
delete object;
}
It calls PrintOutMessageToCommandPrompt(). I'm using VC++.net 2003. I'm pretty sure it has nothing to do with any of the code implementation details; I'm just calling ::MessageBox() in the actual code.
Thanks alot! [smile]