Mail Archives: djgpp/1997/02/23/00:55:45
David Jenkins (me AT jenkinsdavid DOT demon DOT co DOT uk) wrote:
: /* If I un // the next two lines and // the "int ns = 100;" line I
: should be able to enter the number of stars.BUT I keep getting errors
: during compiling.Any ideas???
: */
Again, it's a problem with the order of things... you must define ns
before using it. Put the 'int ns;' before the scanf.
The errors gcc gives you should really give you some idea of what's
wrong - in this case I imagine it said something like:
foo.c:10: 'ns' undeclared (first use this function)
which is fairly self-explanatory.
Also, when you post questions here about errors in programs, it would
be better if you actually posted the errors the compiler reports.
--
George Foot <gfoot AT mc31 DOT merton DOT ox DOT ac DOT uk>
Merton College, Oxford.
- Raw text -