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!!!!!!!!!!!