SPatten
November 24th, 2003, 09:24 AM
I have an application in VC6 compiling and running fine.
I am trying to port it to VC7 but it is crashing when compiled with VC7. This happens inside the new operator.
To try and isolate the problem we took our 'offending' class and created a scaled-down test app which uses this class in the same way but does nothing else.
This compiles and runs fine under both vc6 & vc7. What I have noticed however when stepping through the code, is that our original app uses a different 'new' operator from the test app.
The original uses 'newop.cpp' and the test app uses 'new.cpp'; in vc6 both apps use 'new.cpp'
Why are there 2 new operators?
How does the compiler decide which one to use?
Could this be the cause of my problem (it doesn't crash on every single use of the new operator)?
Thanks
Stef
I am trying to port it to VC7 but it is crashing when compiled with VC7. This happens inside the new operator.
To try and isolate the problem we took our 'offending' class and created a scaled-down test app which uses this class in the same way but does nothing else.
This compiles and runs fine under both vc6 & vc7. What I have noticed however when stepping through the code, is that our original app uses a different 'new' operator from the test app.
The original uses 'newop.cpp' and the test app uses 'new.cpp'; in vc6 both apps use 'new.cpp'
Why are there 2 new operators?
How does the compiler decide which one to use?
Could this be the cause of my problem (it doesn't crash on every single use of the new operator)?
Thanks
Stef