Students and Beginners want to execute C/C++ codes on their Windows PC, here in this tutorial they will find a way to do the same through Dev-C++ program.
Size: 384.72 KB
Language: en
Added: Jan 25, 2014
Slides: 13 pages
Slide Content
How to
Work with Dev-C++
Compile and Execute C/C++ Code
We usually find a LINUX environment in college
labs when working with C or C++ Languages.
But it is a good practice to execute the codes on
our PC, through certain C/C++ Compilers like
Dev-C++ and Turbo C.
In this tutorial, I am using Dev-C++ (version-
5.0.0.4) on a 64-bit Windows machine.
The Execution may vary upon different system.
Things you need to have:
1. a Windows PC (a typical configuration is sufficient).
2. Dev-C++ program (ver.-5.0.0.4 or later is recommended)
installed on your PC.
3. a Sample Code of C/C++ program.
Steps for Execution:
1. Run the Dev-C++ program on your PC.
2. Open a New File and select Project.
New Project.
3.
Now a new window will open,
just select Console Application
and choose your desired language C or C++ and click OK.
Console
Application
C Project
4. Save your Project.dev File into the desired directory.
You may rename it if you wish.
5. Now write your code in the editor console.
6. Insert “getch();” without quotes before the termination of
C-code.
(Insert it before the return function, if there is any.)
* For C++ programs insert
“cin.get();”
before the termination of code.
getch();
It is included in the code to avoid the
flashing; your program can also
run without inserting this into the code.
7. Save your Code into the same directory.
8.
Now Compile
and Run
your Code,
or
Just press the
F9 key
for the same.
You’ll find your code running.
The output of the program.
Hello