.exe file closes

I'm using .dll and tried to run the .exe application.
For example, in generating a random number with a user-input range. I can input just fine. It's just that after it displays the random number, it closes instantly.
When I run my codes, they work perfectly fine.
Is there something wrong with the settings?
Do I have to add something to the code?
Got it. But can you explain why it's like that only in the executable file. I use codeblocks and it works okay when I run the code.
code::blocks keeps the window open for you. Not all ide's do this. msvs for example, does not keep the window open. remember console programs are supposed to be run from the console. The console does not close after a program runs. So any data displayed by the program will still be visible until the user explicitly closes the console window. If you ran your executable program from the console window you would not have this problem.
Last edited on
Topic archived. No new replies allowed.