J
john smith
I am trying to wrap new but am having some problems.
What I want to do is provide my own implementation of "new" Globally not by
class, but within my implementation of new call the regular global new.
So here is the picture.
void* operator new( ... ) // this is my implementation of new
{
// do something
void* operator new(...) // this is the regular new
}
Then when I call new in my program I want my implementation of "new" to be
called which would then call the regular "new".
I have played some games with namespaces but that did not work.
So, I am stuck. Any advice is greatly appreciated.
What I want to do is provide my own implementation of "new" Globally not by
class, but within my implementation of new call the regular global new.
So here is the picture.
void* operator new( ... ) // this is my implementation of new
{
// do something
void* operator new(...) // this is the regular new
}
Then when I call new in my program I want my implementation of "new" to be
called which would then call the regular "new".
I have played some games with namespaces but that did not work.
So, I am stuck. Any advice is greatly appreciated.