Re: inline operator delete redefinition and in-charge deleting destructor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux