www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/03/15:11:46

From: gfoot AT mc31 DOT merton DOT ox DOT ac DOT uk (George Foot)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: malloc help
Date: 3 Mar 1997 17:33:49 GMT
Organization: Oxford University
Lines: 14
Message-ID: <5ff21t$qpj@news.ox.ac.uk>
References: <5fed5n$qtp AT oban DOT cc DOT ic DOT ac DOT uk>
NNTP-Posting-Host: mc31.merton.ox.ac.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Mr P. Steele (ps13 AT gauss DOT ma DOT ic DOT ac DOT uk) wrote:

: pcx_int(pcx_picture *image)
: {
: if(!(image->buffer = (char *)malloc(SCREEN_WIDTH * SCREEN_HEIGHT + 1)));
                                                   remove this semicolon ^
:   printf("Could not allocate screen buffer.");
: }

If you remove the marked semicolon, it should work as expected.

-- 
George Foot <gfoot AT mc31 DOT merton DOT ox DOT ac DOT uk>
Merton College, Oxford.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019