delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/12/18/21:00:45

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: allocate memory
Date: 19 Dec 2003 01:50:35 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 12
Message-ID: <brtlhb$c8a$2@nets3.rz.RWTH-Aachen.DE>
References: <brpjb5$2nq$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <20031218074852 DOT 21755 DOT 00000680 AT mb-m26 DOT aol DOT com> <3FE213CB DOT 6050903 AT phekda DOT gotadsl DOT co DOT uk>
NNTP-Posting-Host: accip02.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 1071798635 12554 137.226.33.41 (19 Dec 2003 01:50:35 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 19 Dec 2003 01:50:35 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Richard Dawe <ng AT phekda DOT gotadsl DOT co DOT uk> wrote:

>      memset(array, 0, sizeof(array));

A note of caution: while this works in this case, memset() is *not*
really guaranteed to work for other cases.  E.g. if the array contains
floats, or you're on some crazy platform that has trap representations
in signed integers, you might run into trouble.

-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


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