How To Write Your First Program in DevC

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 6

Writing your first program in Dev C++ 4.9.9.

2
Note: Please note down that same steps should be followed to write/compile/run a
C program in Windows Vista or Windows 7.
Step1: Starting the Dev C++ Compiler

Step2: Opening a file source file

Step3: Writing the code of your program

Step4: Saving the file

Step5: Name the file and click on Save button.

After the above program is executed, the output can be seen as given below.

An Important Note:
Note that when a program is successfully compiled in Dev C++ version 4.9.9.0 and
version 4.9.9.2, a header file warning is displayed at the bottom of the as can be seen in
the screenshot.

The highlighted red box shows the warning generated after the successful compilation.
Do not get confused with it as it is not any kind of error and your program will run
successfully even if this warning is in the program.

How to remove the header file warning?


To remove the above warning, declare the header file as #include<iostream> and also
write the statement using namespace std; at the beginning of your program code. Below
is the screenshot to do this.

As it can be seen that when we compile and run our program after making the changes in
the coding as mentioned above, the warning is now removed.

You might also like