using dev-c++ - ssucet.orgjgallaher/download/etec102/usingdev-c++.pdf · what is dev-c++ dev-c++ is...
TRANSCRIPT
Using Dev-C++
© Copyright 2003 Janna B. Gallaher
What Is Dev-C++What Is Dev-C++
Dev-C++ is an integrated development environment fordeveloping C and C++ projectsIt is a GUI environment similar to Microsoft Visual StudioIt can handle multi-file projectsIt is based upon the Gnu C Compiler (gcc) and works ina Microsoft Windows environment.
Dev-C++Dev-C++
Screen shot of the Dev-C++ Integrated Development Environment
Program Editing Area
Project and Class Area
Menu BarTool Bar
Dev-C++ Menu BarDev-C++ Menu Bar
File Menu Edit Menu Search Menu View Menu Project Menu
Execute Menu Debug Menu Tools Menu CVS Menu Window Menu
Using Dev-C++Using Dev-C++
The process of creating programs with Dev-C++ is similar to theold process:
Create or Open an existing source file with the editorEnter the program codeSave the source fileCompile the source file to create executable programDebug program and fix errors as necessary then re-compileRun program
Dev-C++ combines these functions in one environment.
Step 1: Create/Edit Source CodeStep 1: Create/Edit Source Code
Either open an existing file orcreate a new source file
The “New” option results in this dialogbox. At the present, select “ConsoleApplication” and “C Project”
Step 2: Enter/Edit Program CodeStep 2: Enter/Edit Program Code
Text Edit Area - similar to a wordprocessor.
Program code.
Step 3: Save the ProgramStep 3: Save the Program
Save Options. (Note that the “Save As”option brings up the “Save File” dialog box.)
Step 4: Compile ProgramStep 4: Compile Program
Compile the program using eitherthe Execute menu or the hot-buttons.
Compile Run Compile and Run
Rebuild All
Step 4a: Compiled Program With ErrorsStep 4a: Compiled Program With Errors
Debug and Notification Area
Note that the offendingstatement is highlighted.
The debugger identifies theline number of the error
Step 4c: Successfully Compiled ProgramStep 4c: Successfully Compiled Program
Step 5: Run the ProgramStep 5: Run the Program
Either select run from the menu or click the “compile andrun” button to execute the program.The program output will be displayed in a DOS window.The window disappears as soon as it is displayed. Toavoid this call the system(“pause”) function.
Dev-C++ Advanced FeaturesDev-C++ Advanced Features
Dev-C++ uses project files to create multi-file programs.It has a debugging facility.Advanced word processing features such as search andreplace.Creates and manages classes and templates toimplement C++ functionality.