View Single Post
  #1 (permalink)  
Old October 4th, 2007, 08:43 PM
cbgreene9185 cbgreene9185 is offline
Registered User
 
Join Date: Oct 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default NEED HELP!!!!!!!

I'm trying to write a program for my c++ class that takes binary numbers and converts them to decimal. I have programmed this all fine and dandy, but I'm having trouble with my EOF statement. The program requires that I use 3 functions, the first being to prompt user for 8 digit max binary number, the second converts it to decimal, and the third function displays the results.
    I have everything coded perfectly so far, but the teacher wants me to have the user type '@' when they want to quit the program. Then I should assign @ the value of -1 and send it back to main. When I run my program it freaks out when I type @ because the function is an int function. How do I change it so that I can type '@' without pissing off my computer?
Note: I am not allowed to use arrays, just functions and classes and templates, but I'm not that familiar with classes and templates. PLEASE HELP!!!!!!!!!!!


Reply With Quote