TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: PAUL ELLIOTT
from: JERRY COFFIN
date: 1997-06-25 11:18:00
subject: C++ Problem

On (23 Jun 97) Paul Elliott wrote to Jerry Coffin...
 JC>     bl = new BINLOG[lc_num];
 JC>     delete [] bl;
 PE> That doesn't work, the linker reports: -
 PE> Error: Undefined symbol operator new[](unsigned int) in module ccc.cpp
 PE> Error: Undefined symbol operator delete[](void far*) in module ccc.cpp
 PE> I think its because ProBoard's SDK doesn't support them functions. :(
 PE> Have you any idea on how to get round this?
Not for sure.  You _might_ be able to get by with defining global new
and delete operators:
void *operator new(size_t size) {
    return malloc(size);
}
void operator delete(void *ptr) {
    free(ptr);
}
but it's not clear whether this would work or not.  There's also a
separate overload for operator new[] and delete[] on newer compilers,
but depending on the compiler you're using, that may not be supported at
all.  If the system doesn't support normal new and delete operators, my
guess is that it won't support any of this, and you'll need to just use
malloc and free directly.
    Later,
    Jerry.
... The Universe is a figment of its own imagination.
--- PPoint 1.90
---------------
* Origin: Point Pointedly Pointless (1:128/166.5)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.