Title | Dev Cpp Tutorial Graphics h |
---|---|
Author | sheikh rabi |
Course | computer science |
Institution | Virtual University of Pakistan |
Pages | 7 |
File Size | 938.9 KB |
File Type | |
Total Downloads | 107 |
Total Views | 171 |
In this document full details for using compiler and how to run a code ....
11/25/11
De-C++ Tia f CSC 161 Sde
Dev-C++ Tutorial for CSC 161 Students (Maintained b Michael Serrano)
Update (9/12/2006): I' bee ie e ie ice I'e daed hi age; i fac, I ac f i f ahie. I he he ha i a i be ef, I'e daed hi ia be ce ih he ae ei f De-C++ (a f hi iig, Vei 5 Bea 9--a..a. Vei 4.9.9.2). Mike
What is Dev-C++? De-C++, deeed b Bdhed Sfae, i a f feaed gahica IDE (Iegaed Deee Eie), hich i abe ceae Wid cebaed C/C++ ga ig he MiGW cie e. MiGW (Miiai GNU* f Wid) e GCC (he GNU g++ cie ceci), hich i eeia he ae cie e ha i i Cgi (he i eie ga f Wid) ad ei f Li. Thee ae, hee, diffeece beee Cgi ad MiGW; i Diffeece beee Cgi ad MiGW f e ifai.
Click picre o enlarge.
*GNU i a ecie aconm fo "GNU' No Uni"; i i pononced "gh-NEW". The GNU Pojec a lanched in 1984 o deelop a fee and complee Uni-lik e opeaing em.
Bloodshed!? I' be he fi a ha he ae Bdhed ' gie a ad fie, b I hi i' be if he cea f Bdhed eai: First I would lik e to sa that I am not a satanist, that I hate violence/war and that I don't lik e heav metal / hard-rock music. I am french, but I do k now the meaning of the "Bloodshed" word, and I use this name because I think it sounds well. If ou are offended b the name, I am ver sorr but it would be a big mess to change the name now. There's also a reason wh I k eep the Bloodshed name. I don't want people to think Bloodshed is a compan, because it isn't. I'm just doing this to help people. Here is a good remark on the Bloodshed name I received from JohnS: I assumed that this was a reference to the time and effort it requires of you to make these nice software programs, a la "Blood, Sweat and Tears". Peace and freedom, Colin Laplace
.iee-eae.c/dec/#e4
1/7
11/25/11
De-C++ Tia f CSC 161 Sde
Geing De-C++ T D-C++ ( GPL) CD B (' ), D-C++ /. L B D-C++ D-C++ . Y D-C++ C:\D-C, - .
Uing De-C++ T . A CSC161 (.. (), () /// ). T D-C++ . Sep 1: Confige De-C++. W . G "Tools" "Compiler Options". I "Settings" , "L" , "Generate debugging information" "Yes":
C "OK". Sep 2: Ceae a ne pojec. A "" . G "File" "New", "Project...". C "Empt Project" "C++ project" . H . Y , . O , "OK". D-C++ . .iee-eae.c/dec/#e4
2/7
11/25/11
De-C++ Tia f CSC 161 Sde
Step 3: Create/add source file(s). Yo can add emp oce file one of o a: Go o he "File" men and elec "Ne Source File" (o j pe CTRL+N) OR Go o he "Project" men and elec "Ne File". Noe ha De-C++ ill no ak fo a filename fo an ne oce file nil o aemp o: 1. Compile 2. Sae he pojec 3. Sae he oce file 4. Ei De-C++
Yo can add pe-eiing oce file one of o a: Go o he "Project" men and elec "Add to Project" OR Righ-click on he pojec name in he lef-hand panel and elec "Add to Project". EXAMPLE: Mliple oce file
I hi eae, e ha 3 fie ae eied cie he ga; The "die.c" fie efeece "Dee.h" (hich eie "Dee.c") ad "Dee.c" efeece "Qee.h" (hich eie "Qee.c").
Step 4: Compile. Once o hae eneed all of o oce code, o ae ead o compile. Go o he "Eecute" men and elec "Compile" (o j pe CTRL+F9). I i likel ha o ill ge ome kind of compile o linke eo he fi ime o aemp o compile a pojec. Sna eo ill be diplaed in he "Compiler" ab a he boom of he ceen. Yo can doble-click on an eo o ake o o he place in he oce code hee i occed. The "Linker" ab ill flah if hee ae an linke eo. Linke eo ae geneall he el of na eo no alloing one of he file o compile. Once o pojec ccefll compile, he "Compile Progress" dialog bo ill hae a a of "Done". A hi poin, o ma click "Close". Step 5: Eecute. .iee-eae.c/dec/#e4
3/7
11/25/11
De-C++ Tia f CSC 161 Sde
Yo can no n o pogam. Go o he "Eecute" men, chooe "Run". Noe: o pa command-line paamee o o pogam, go o he "Eecute" men, chooe "Parameters" and pe in an paamae o ih o pa. Disappearing indos If o eece o pogam (ih o iho paamee), o ma noice omehing peclia; a conole indo ill pop p, flah ome e and diappea. The poblem i ha, if diecl eeced, conole pogam indo cloe afe he pogam ei. Yo can ole hi poblem one of o a: Method 1 - Scaffolding: Add he folloing code befoe an return aemen in main() o an eit() o abort() aemen (in an fncion): /* Scaffolding code fo eing ppoe */ cin.ignore(256, '\n'); cout...