codeblock file wont run on windows

Write your question here.
I have a problem(don't know how to) with codeblock
after completed the code, I hit f9 it works fine,
but if I run it from windows by double click the compiled
file it just showed up a split of a second then went away.
is there a way to fix this problem. thank you.
I am using codeblock 16.01 with windows 7
Put the code you need help with here.
[/code]
Can you review your question and see if it can be answered?

Anyways, what codeblock file that won't run on windows?
closed account (E0p9LyTq)
Console Closing Down
http://www.cplusplus.com/forum/beginner/1988/
closed account (E0p9LyTq)
Pattako wrote:
Anyways, what codeblock file that won't run on windows?

The program is working as expected, the difference lies in how it is executed. From within the code:blocks IDE the console window stays open. From Window's File Explorer the console window closes immediately after the program terminates.
hi FurryGuy,

your statement is better than my question, this is what I want to know
how to run a compiled file on windows, I have no problem to run it within codeblock IDE, but after it was build I cannot run the .exe on window (or
I am not even know how to build a .exe file). thank for your help
closed account (E0p9LyTq)
If code:blocks can run your program, you have already built your .exe file. That's already taken care of.

Now to run your program without using c:b you need to "fall back" to the old DOS method of running programs, using Windows Command Prompt.

Simply open a Command Prompt console window, navigate to the directory where you program file is located and run it from there, or type the entire path to your program without changing the default directory Command Prompt uses when it starts up.

If you are running Windows 10 you can simply drag and drop your program file onto the console window and Win 10 will automatically add the entire path for you.

With an already open console window when you run your program and it terminates you can now see any output.

Please read the following link, it goes into considerable detail about what you are experiencing (your program doesn't appear to run) and methods how to solve the issue:

Console Closing Down
http://www.cplusplus.com/forum/beginner/1988/
Topic archived. No new replies allowed.