Writing your first program in Dev C++
Note: Note that the same steps, given below, are followed to write/compile/run a C/C++ program in Windows Vista or Windows 7 as well.
Step 1:
Starting the Dev C++ Compiler
![Starting the Dev C++ Compiler](Images/0000001.jpg)
Step 2:
Opening a new file, source file
![Opening a source file](Images/0000002.jpg)
Step 3:
Writing the code of your program
![Writing the code](Images/0000003.jpg)
Step 4:
To Save the file, after naming the file, click on Save button
![Saving file](Images/0000004.jpg)
![Naming and Saving file](Images/0000005.jpg)
Step 5:
To execute the program, click on compile & Run the program
![Execute the program](Images/0000006.jpg)
Output
After the above program is executed, the output can be seen as given below.
![Output of the program](Images/0000007.jpg)
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.
![Warning displayed](Images/0000008.jpg)
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.
![using namespace](Images/0000009.jpg)