Mail Archives: djgpp/1999/01/24/12:06:34.2
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 -