www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - compile error on delete and delete [] operators

↑ ↓ ← amaury pouly <amaury_member pathlink.com> writes:
Hi,
I have a problem when I try to use the novodex physic engine(version 2.1.2), I
have errors on the operators delete and delete [] because they include the file
and the line as parameters :

NX_INLINE void  operator delete(void* p, const char*, int);
NX_INLINE void  operator delete[](void* p, const char*, int);

and the errors are:

Error: must be void operator delete(void * [,size_t]);
Error: must be void operator delete[](void * [,size_t]);

How can i make the compiler accept this operator surcharge ??? Is it a compile
option ?
Please help me .
Dec 28 2004
↑ ↓ → "Walter" <newshound digitalmars.com> writes:
"amaury pouly" <amaury_member pathlink.com> wrote in message
news:cqrgo7$vbi$1 digitaldaemon.com...
 Hi,
 I have a problem when I try to use the novodex physic engine(version

 have errors on the operators delete and delete [] because they include the

 and the line as parameters :

 NX_INLINE void  operator delete(void* p, const char*, int);
 NX_INLINE void  operator delete[](void* p, const char*, int);

 and the errors are:

 Error: must be void operator delete(void * [,size_t]);
 Error: must be void operator delete[](void * [,size_t]);

 How can i make the compiler accept this operator surcharge ??? Is it a

 option ?
 Please help me .

At the moment the only way this could be made to work is to do something like: int __line; const char* __file; #define delete(p,file,line) (__file = file, __line = line, delete(p))
Feb 07 2005