Unix problem or C problem?
Paul De Bra
debra at alice.UUCP
Thu Jan 19 05:49:46 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) {
>...
> for (count = 0; count <= stars; count++)
>...
> I get the following error message, NOT put out from my program:
>
>PROTECTION VIOLATION: name='plot', pid=15943, pc=a410cdc, ps=80000180
>Illegal instruction
>From your piece of code it looks like "stars" is either an int,
in which the fscanf line should have &stars, or else it is a pointer to
an int, in which case the for-line should have *stars.
>From the protection violation i deduce it is probably the first.
The error message seems strange though. I would expect a simple
Illegal instruction, core dumped or
Memory Fault, core dumped messge. You actually get a lot of info there.
Paul.
--
------------------------------------------------------
|debra at research.att.com | uunet!research!debra |
------------------------------------------------------
More information about the Comp.unix.wizards
mailing list