Author Topic: executable file created  (Read 3202 times)

sial19

  • Guest
executable file created
« on: October 09, 2007, 04:49:59 pm »

Hi,

I am a beginner in the C programming language, and I would like to use Code Blocks as my IDE.
My OS is Windows XP SP2.

When I compile and build an easy program in Code Blocks, and run it, there is no problem.
But when I try to run the executable file generated by Code Blocks corresponding, nothing is hapenning.

And if I include at the end of my source code the instruction system ("PAUSE") before the instruction return 0, the executable file generated is OK.

the question is : Do I have to write system("PAUSE") in each source code ?

In the course "site du zero", they said that the difference between devC++ and Code Blocks is that in devC++, you need to write system("PAUSE"), and in Code Blocks, that is not necessary.

Is my problem about the compiling configuration?

Thanks very much.


Offline XayC

  • Multiple posting newcomer
  • *
  • Posts: 94
Re: executable file created
« Reply #1 on: October 09, 2007, 06:48:43 pm »
Code::Blocks is able, when running your console application to stop when the program ends so that you can see the results on the console window.
This feature is only available when running your program from the IDE, if you run the executable outside CB, in order to see the results of the application, you have to add the system("pause") call or run it from a command console.

Quote
But when I try to run the executable file generated by Code Blocks corresponding, nothing is hapenning.
I guess what happens here is that your program runs, prints the output in a console window and then it terminates closing the console window with it. If this happens fast enough you may not see anything.

Regards, XayC

sial19

  • Guest
Re: executable file created
« Reply #2 on: October 10, 2007, 09:54:22 am »

Hi XayC.

It's very kind of you to answer my question.

You're right, it is exactly happening as you expected.

I have thought it was a compiler configuration problem, but as per your explanation, it isn't.

OK, once again, thanks a lot.

Let me go ahead and appreciate C::B

Best regards,

sial19.