Monday 27 February 2012

Compile using DevC++ compiler


If you work on Windows and use DevC++, then editing and compiling is as easy as click of a button. DevC++ is an IDE which allows you to edit, compile, run and debug your program in the IDE itself.  If you want to install DevC++ then install it from here.
  1. Once you have installed and configured the software, Write and save your program using DevC++ itself. Create a new program by clicking on New à Project.


  1. Choose Empty Project from New Project dialog and choose a name for the program, in our case first and click Ok.
  1. Write the code of the program and save it.
  1. Click on Compile button (third row, first button) to compile your source code. If there are any errors in your program, then a window at the bottom will specify the warnings.
  2. After program is compiled, click on Run button (next to compile).
  3. However, DevC++ has a problem. As soon as you Run the program, output window opens momentarily and then it closes. So to come around this solution, set a breakpoint at the end of main function and then click on Debug instead of running it.
    4.When you run the program, output window will show the string.

No comments: