www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/23/00:55:45

From: gfoot AT mc31 DOT merton DOT ox DOT ac DOT uk (George Foot)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Problems with Scanf in Allegro.WAS -Problems with palette.
Date: 21 Feb 1997 03:42:44 GMT
Organization: Oxford University
Lines: 23
Distribution: world
Message-ID: <5ej5jk$oi3@news.ox.ac.uk>
References: <nQgAZIAVUODzEwI3 AT jenkinsdavid DOT demon DOT co DOT uk> <lPKw+OA9XRDzEwY5 AT jenkinsdavid DOT demon DOT co DOT uk>
NNTP-Posting-Host: mc31.merton.ox.ac.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019