Newbie C++ programmer again...

Eric Samson airickjay@hotmail.com
Fri, 18 Aug 2000 07:31:00 MST


Ok, I have about gone nuts trying to figure this out...

This is my assignment that I am having trouble with..

It's a simple currency converter, the user enters a float which indicates 
how many US dollars they want to convert to a specified currency, in my case 
Deutchmarks...  That is the easy part, got it written no problem, simple 
math... An optional part of the assignment is to validate the user input and 
be sure it is a numeric value (float), and not an alpha charater, symbol, 
etc...  If they enter something that will not work, they are supposed to be 
prompted to try to enter the info again...  Preventing negative values is no 
problem with the <while (someinput < 0)> loop, but if they enter an alpha 
value, it enters an infinite loop.  I went to borders last night and my 
roommate and I (mostly because he is tired of hearing me whine about it) 
looked in a bunch of books for a solution, and didn't have any luck.  My 
instructor was no help either, he wasn't sure how to do it (he is a VB 
programmer teaching C++, go figure)...  This seems like something that 
should be painfully simple...  Is this something too complex for a beginning 
programmer?  I should think that it would be a basic part of programming, 
but I could be wrong...  I notice a few people on here saying they don't use 
C++ much, so what is the language of choice for programming in Linux?

Thanks again,

Eric
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com