I was trying to overload the new and delete operator globally. The code is:
void * operator new(size_t s) { cout<<"\\nOverloaded new op