08 November 2014

DEV-C++ , try with a simple c program

DEV-C++ starts up.

 

Try  with a simple C program.

start the program
Click File/New/Project  . Pick a name for the project (such as "myProject"). Click "C Project". Click on "Empty Project". Click "OK".
In "Create New Project", click "save" (later on you will probably want to create separate subdirectories for your various projects.).
Click "File/New/Source File" and in "Add source file to current project" click "Yes". You now get a screen where you can edit the source file.
Type in a simple C program, as below. Now click "File/Save As" and save the file as "hello.c" (or other name.) Important: be sure that the file extension is .c. With any other extension (such as the suggested .cpp) you will have problems compiling.
Now click "Execute/Compile and Run"
The program will (hopefully) compile, run, and write its output to a DOS window. If you have the system("pause") statement in your program, the output will stay in the window until you hit a key.
At this point, the compiler and development environment has been installed. You should find Dev-C++ listed under "Programs" on the "Start" menu and will now be able to write, compile, and run C programs.

No comments: