1. When running without getchar flash back, plus you can output the helloworld similar, but there is no "press any key to continue"
2. Need you for the input data is the data of the output, the runtime can input data but a input after press the return key to run ended, not the results
Program (ps: I can guarantee no problem, I and my classmates are all a piece of software, a code, but only I a person appeared this problem)
I'm very strange, why
CodePudding user response:
Finally add a system (" pause ");CodePudding user response:
Getchar means waiting for input, it will not show "press any key to end", according to two enter it would appear,The second question no code is bad judgment
CodePudding user response:
Please look at the dev c Settings, "tools" - "" environmental options" - "checked" basic "TAB in the" after the return to suspend the console program,"CodePudding user response:
Tencent software centerSearch DEV
To download
CodePudding user response:
Because someone else is directly using the "run" on the compiler function to run the program, it will run the program at the end of the program output to suspend a press any key to continue, let you can see their results, which is caused by the compiler,And once you compile completed, do not use the compiler "run" feature, and folder double-click the program built on their own, in this case, if you don't add some make you pause after output function, such as getchar getch or system (" pause ") will quickly run out and then end the program directly,
The same code so you and your classmates, but students in the compiler function of the "run" to run the program, and you are directly under the folder to run their program built, this will lead to what you said that two kinds of differences,
Above, is the reason why I think,
To make yourself and your classmate is consistent, it is to use the compiler function of the "run"),
CodePudding user response:
On, very agree with upstairs point of view, first check to the compiler. If the compiler is no problem, can try to reinstall the software a try, I also am just getting started, please advice,