delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/01/24/12:06:34.2

From: Dave Bird <dave AT xemu DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Need help with c!
Date: Sun, 24 Jan 1999 16:16:08 +0000
Organization: very little
Message-ID: <yDwul5AId0q2EwXh@xemu.demon.co.uk>
References: <clcm-19990117-0010 AT plethora DOT net>
<3 DOT 0 DOT 6 DOT 32 DOT 19990124000016 DOT 008455a0 AT pop DOT netaddress DOT com>
NNTP-Posting-Host: xemu.demon.co.uk
X-NNTP-Posting-Host: xemu.demon.co.uk:158.152.196.209
X-Trace: news.demon.co.uk 917197237 nnrp-04:6798 NO-IDENT xemu.demon.co.uk:158.152.196.209
X-Complaints-To: abuse AT demon DOT net
MIME-Version: 1.0
X-Newsreader: Turnpike (32) Version 4.01 <dQumtnY$x4rJ2u5tL5fS$n2vuP>
Lines: 28
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

In article <3 DOT 0 DOT 6 DOT 32 DOT 19990124000016 DOT 008455a0 AT pop DOT netaddress DOT com>, Paul
Derbyshire <pderbysh AT usa DOT net> writes
>At 04:37 AM 1/24/99 GMT, you wrote:
>>Get rid of the word static in front of FILE *fptr because that should be
>>able to change as you work with the file. If it can't change it won't work
>>properly.
>
>Static? Are you sure you have the right keyword here? const FILE * would
>make the pointer impossible to re-aim; and FILE *const would make it
>impossible to write through it. static FILE * only means that the pointer
>(4 bytes) is allocated at program launch. If it's in a function it also
>means it persists between function calls. If it's in a class, it means that
>it has one instance shared for the whole class rather than there being a
>pointer in every instance.

 I think he is confused with Java, where class members which are 
 both "static" (once per class) and "final" (constant once the
 class is loaded) are, by convention, plain old compile-time constants.

 But C++ is not Java; and "static" is not "static final" anyway.


-- 
   ^-^-^-@@-^-;-^   http://www.xemu.demon.co.uk/
        (..)__u     news:alt.smoking.mooses

       happy as a clam at high tide -. <_" .-._.-.

- Raw text -


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