FILE *fp[]; /* is this possible? */
Doug Gwyn
gwyn at smoke.brl.mil
Wed Nov 28 05:37:58 AEST 1990
In article <1990Nov27.131327.21662 at agate.berkeley.edu> labb-4ac at e260-2a.berkeley.edu (superMan (the web dweller)) writes:
>FILE *fp[256];
>for(i=0;i!=256;i++) fp[i]=fopen(file_name[i],"r+");
>but when I look at the value of fp[i] I get (nil)
Well, why not? fopen() is entitled to fail. And it probably will if
you try to have too many files open at the same time.
More information about the Comp.lang.c
mailing list