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

On (16 Jun 97) Paul Elliott wrote to All...
 PE> Error _lc.c 57: Cannot convert 'void *' to 'BINLOG *' in function
 PE> main(int,char * *)
 PE> *** 1 errors in Compile ***
 PE> Here's a copy of line 57: -
 PE>          bl = malloc( lc_num * sizeof(BINLOG));
The simplest cure is:
    bl = (BINLOG *)malloc(lc_num * sizeof(BINLOG));
but you're probably better off converting it to real C++:
    bl = new BINLOG[lc_num];
However, if you do the latter, you need to find the corresponding calls
to free(), and convert them to:
    delete [] bl;
This shouldn't be a terrible amount of work either, and is generally
preferrable.
    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™.