From: Dave Bird 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: References: <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 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 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 -. <_" .-._.-.