On 2010-03-30, Phil Carmody <> wrote:
> #include <stdio.h>
> void do_stuff(FILE **pfp) { fputs("did something!\n", *pfp); }
> void get_stuff_done(void) { do_stuff(&stdin); }
Ooh, sneaky. If "stdin" isn't actually an object of type "FILE *",
but an expression yielding one, it can indeed be invalid to take its
address. That would not have occurred to me.
I do actually have a hunk of code floating around which uses a FILE **,
but it operates only on the addresses of FILE * objects I've declared
myself.
-s
--
Copyright 2010, all wrongs reversed. Peter Seebach /
usenet-
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!