TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: ALL
from: JASON REYNOLDS
date: 1998-05-11 23:31:00
subject: malloc vs. new

  I am working on converting the following over to C++.  I would like to use 
new instead, but cannot get it to work.  It will be used to store information 
loaded from a PCX file to be later displayed to the screen.
#define SCREEN_WIDTH    (unsigned int) 320
#define SCREEN_HEIGHT   (unsigned int) 200
char far * buffer;
        // 64,000 byte buffer to hold the image
if (!(buffer = (char far *) _fmalloc(SCREEN_WIDTH * SCREEN_HEIGHT +1)))
        cout << "\n couldn't allocate screen buffer");
If anyone has some source code written in C++ that uses mode 13h I'd 
appreciate finding somthing to help me.  I am currently learning from a book 
that writes in C, and I'd like to use C++ classes, and features.  I am 
currently working on my own library so I can program some stuff in mode 13h.  
Thanks for any help.
--- Maximus 3.01
---------------
* Origin: The Other Side (605) 342-7335/Rapid City, SD (1:293/640)

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™.