Original Post
If I had a base class that had it''s new operator overloaded, would it be possible to access that object? Example
class Object
{
void * operator new( size_t size )
{
void * pNewObj = malloc( size );
Object *pObj = (Object *)pNewObj;
pObj->value = someValue;
return pNewObj;
}
};
I know that the constructor has not yet been called, but when it does will the value be set to what I want?
What I want to do is to allow my object to store it''s list index when it is placed into the list, which happens to occur in the overloaded new operator.
Any ideas??
Kory