Date: Sat, 3 Mar 2001 19:27:02 -0500 Message-Id: <200103040027.TAA09839@envy.delorie.com> X-Authentication-Warning: envy.delorie.com: dj set sender to dj AT envy DOT delorie DOT com using -f From: DJ Delorie To: djgpp AT delorie DOT com In-reply-to: (jstewart1 AT ns DOT sympatico DOT ca) Subject: Re: trig function?? loopings References: Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk What I would do (besides not using C++ for such a trivial task ;) is read in a line (array of chars), check the line for being empty (the sentinel), and then parse the line as a number (using sscanf, I suppose). That also handles bogus input better, since your code won't handle malformed input well. In general, when I want a line of input from the user, I read a *line*, and parse it myself. You should also multiply degrees times M_PI/180, not the other way around.