I guess im just being lazy but rather than put every use of new[] in a try/catch block i thought that i would overload the operator to do it for me.
This is just an exercise in getting it right.I have never before had cause to overload new[] and i know i could have used set_new_handler()...
have already tried that and memory is included anyway..
have tried making it static but it is implicitly staic anyway.
any other ideas as to why global new has gone missing.
Item 9 in scott meyers effective c++ mentions if you use a form of the operator with a different number of arguements...
no i disagree....
i am overloading new as a member function passing on the call to global new[]
i have seen similar code in books and examples and it compiles on gnu g++ or whatever it is but wont compile on MSVC. i think this problem is msvc specific.
doesn't cause infinite recursion on...
im trying to overload new[] for my own string class Cstr.
My code compiles on other compilers but not on msvc6.
anyone know how to get this working?
the error i get is new[] is not a member of global namespace.
I have the usual headers included and a using namespace std statement.
this is the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.