Advertisement

auto-include???

Started by October 01, 2000 08:01 AM
0 comments, last by blebb 24 years, 3 months ago
I have one file called debugtest.cpp. This file includes a Debug.h file which contain overloading functions of the new and the delete operators. This file then calls functions in a Debug.cpp file. This file does not include the Debug.h file but it somehow it seem like it does that anyway. Because when I put in, for example, void *a = new char[3] my overloaded function get called! Got any idea how this is possible? It drives me nuts!
Make sure the new operator is only overloaded as a member of a class.

Never tried making a global overloaded operator, dunno if you can even, but maybe the operators are overloaded globally so they run every time anywhere in your code.

Of course I could be like fully wrong... but it was the first thing that popped into my head...

Cel
Cel aka Razehttp://chopper2k.qgl.org

This topic is closed to new replies.

Advertisement