..................
Last edited by ki113r; 09-05-2007 at 10:03 AM.
"No-one else has reported this problem, you're either crazy or a liar" - Dogbert Technical Support
"Have you tried turning it off and on again?" - The IT Crowd
If you don't immediately remove those goto's, I'm not going to help you further. goto's are NOT the way to solve the problem.
Also, post the if-statement that gives your error (with the f's).
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Unfortunately it still does the infinite loop Btw this is how it looks when I run it :
http://img119.imageshack.us/img119/3227/coders4.jpg
Last edited by ki113r; 09-05-2007 at 09:07 AM.
Unless you have changed it just this moment, the scanf() still needs to be %f, not %d. If you scanf with %d and enter 1.2 (or anything else with a . in it), scanf will get stuck on the . in the input, and since you have no code to consume the remaining input, you get an infinite loop.
I did suggest to use fgets() and sscanf(), rather than scanf(), because it avoids many of the problems of "garbage in the input causes strange problems".
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Wohoo , it sort of worked
Code:C:\Users\Ben\dm\bin>test3 Enter Exposure Time: 12 The selected Exposure time is 12 Please enter the aperture size 1.4 Invalid aperture=1610612736 Please Try Again Please enter the aperture size 12 You have entered a correct value