Solution #0 (proper):
Run program from shell (cmd.exe
, bash
)
Solution #1 (proper):
Run program from orthodox file manager. Far Manager or midnight commander.
Solution #2 (alternative);
Redirect output to file. program.exe >file.txt
from command line.
Solution #3 (improper):
Launch message box, use "sleep"/"Sleep" to delay program termination.
Solution #4 (improper):
Request user input at the end of program.
Solution #5 (improper):
Set breakpoint on "return 0", debug the program.
Solution #6 (windows+msvc):
Launch program from msvc by Ctrl+F5 using debug build. You'll get "press key to continue" prompt.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…