I've written a calculator program but at the moment I'm not getting the right calculation results. I want the program to convert the character input into a double data type.
I tried using the function atof but this didn't work. does anyone have any solutions?
double add(double x, double y)
{...
I've written a small program, part of the program asks the user to input two numbers. How do I go about testing the numbers to check that the user did input an integer and not a character by accident. I ve tried the folowing:
label:
cout << "Please enter a number: ";
cin >>...
Hi, I know this is supposed to be simple but I can't figure what variable(s) I would use if I was writing a program that prompts a user to enter a character, the program then displays a message if the user entered an integer or a letter. I know the program uses an if-else statement but I don't...
Can anybody please help?
I have an application that has an intro leading to a menu screen. Using 'go to the frame' the application waits until a user clicks a button moving to another screen. I would like the application to reset itself to the start if the menu screen is idle for a certain...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.