This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: inline operator delete redefinition and in-charge deletingdestructor
- From: Eljay Love-Jensen <eljay at adobe dot com>
- To: Christian BRUEL <christian dot bruel at st dot com>, gcc-help at gcc dot gnu dot org
- Date: Tue, 11 May 2004 10:54:55 -0500
- Subject: Re: inline operator delete redefinition and in-charge deletingdestructor
- References: <40A0CE15.8F3CA05D@st.com>
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