I've implemented a new operator with a parameter in one of my classes as such:
However, because I'm defining a parametered new operator, the default new operator ceases to exist and I get compiler errors if I want to instance an object using the default new.Code:class test { public: static void* operator new (size_t size, int somevalue) { return malloc(size); } };
Is there any way to keep the default new operator or do I have to redefine it manually?




Reply With Quote