How to run an executable from within a c program?

I installed C\Turbo C++. But i am not able see executable window after i compiled n run the program. Pls help?

  • Here i have see 0 errors and 0 warning. But when i press Ctrl+F9 key i am not getting any executable window. Is it any issue with installation?

  • Answer:

    Your programs compile and executes fine but you are not getting output window right. If that so, solutions are - 1) After compilation and execution using ctrl + F9, go to menu window->output. You'll see the latest output window. 2) Just add getch() or getche() function at the end of your main(). It will hold the window for user input ( Specifically waits for character) and you can see your output.

Sudesh at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

Please elaborate what happened at runtime when you press ctrl+f9.. There can be directory problem

Vunny

Yes, i know this problem, during compilation it says "UNABLE TO MAKE .EXE", Click OK. I would recommend you to go for Visual Studio 2010 Express Edition rather than doing it on Old system such as Turbo C. Also in VC++ 2010 You can set your Preference to DEBUG and RELEASE versions of .exe file. As you know VC++ makes exe files automatically for debugging as well as for release version. It is free for 30 Days and available at Microsoft Site and It is best IDE.

Bharat Swabhiman

It could be your executable window is up and down too quickly. Try putting this: char c[2]; cout << "Hit enter:"; cin.getline(c, 2); ... at the end of your code. When you run it, it will stop and wait for you to hit the "Enter" key.

Unca Alby

add a delay(); function a the end of your code, to check if you output window is not getting closed faster.

priya k

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.