inline operator delete redefinition and in-charge deleting destructor
Eljay Love-Jensen
eljay@adobe.com
Tue May 11 15:55:00 GMT 2004
Hi Christian.
You need...
#include "new"
... at the top of your i.h file.
Also, destructors have () parameter specification, not (void) for their
parameters.
Also, your header files should have guards to make sure they are only
included once.
Also, C++ uses...
#include <cstdio>
... not...
#include <stdio.h>
Also, you may want to change the name of your "new" header file to
"mynew.h" or "mynew.hxx" or "mynew.hpp". I prefer the first convention.
Style point: MyClass* b = new MyClass; (the C++ way) is preferable to
MyClass *b = new MyClass; (the C way).
Style point: you should put the "extern int glob;" in a header file,
instead of hard coded.
HTH,
--Eljay
More information about the Gcc-help
mailing list