From: "Michael Stewart" Newsgroups: comp.os.msdos.djgpp Subject: Re: malloc() problem Date: Tue, 8 Jun 1999 09:22:00 +0100 Organization: (Posted via) Netcom Internet Ltd. Message-ID: <7jijjm$7on$1@taliesin.netcom.net.uk> References: NNTP-Posting-Host: hgty.capgemini.co.uk X-Trace: taliesin.netcom.net.uk 928829878 7959 194.42.240.2 (8 Jun 1999 08:17:58 GMT) X-Complaints-To: abuse AT corp DOT netcom DOT net DOT uk NNTP-Posting-Date: 8 Jun 1999 08:17:58 GMT X-Newsreader: Microsoft Outlook Express 4.72.3155.0 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0 Lines: 16 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Dlanor Blytkerchan wrote in message ... >bufferType *buffer; >bool rc = true; > >rc = ((buffer = (bufferType*)malloc(sizeof(bufferType))) != NULL); >if (!rc) { > start complaining and quit.. >} // if Are you compiling a C or C++ ? (bool and true are C++ keywords) If you are indeed using C++ then consider allocating the structure with new. Mike