Unix problem or C problem?
Doug Gwyn
gwyn at smoke.BRL.MIL
Wed Jan 18 11:14:32 AEST 1989
In article <245 at ibd.BRL.MIL> heilpern at brl.arpa (Mark A. Heilpern (IBD) <heilpern>) writes:
> while (fscanf(input,"%d",stars)!=EOF) {
> fprintf(stderr,"OK to this point.\n");
>PROTECTION VIOLATION: name='plot', pid=15943, pc=a410cdc, ps=80000180
> The "OK to this point" message does not appear when put
> in this position, however it does when placed one line above.
Ahem. Doesn't that TELL you something? Like perhaps there is a
problem with the "while (fscanf(input,"%d",stars)!=EOF)"? In
fact your problem is almost certainly that "stars" is not a pointer
to an integer as required by fscanf(). Perhaps you meant "&stars".
More information about the Comp.unix.wizards
mailing list