using dev-c++ - ssucet.orgjgallaher/download/etec102/usingdev-c++.pdf · what is dev-c++ dev-c++ is...

13
Using Dev-C++ © Copyright 2003 Janna B. Gallaher

Upload: dinhngoc

Post on 11-Feb-2018

240 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Using Dev-C++ - ssucet.orgjgallaher/download/etec102/UsingDev-C++.pdf · What Is Dev-C++ Dev-C++ is an integrated development environment for developing C and C++ projects It is a

Using Dev-C++

© Copyright 2003 Janna B. Gallaher

Page 2: Using Dev-C++ - ssucet.orgjgallaher/download/etec102/UsingDev-C++.pdf · What Is Dev-C++ Dev-C++ is an integrated development environment for developing C and C++ projects It is a

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.

Page 3: Using Dev-C++ - ssucet.orgjgallaher/download/etec102/UsingDev-C++.pdf · What Is Dev-C++ Dev-C++ is an integrated development environment for developing C and C++ projects It is a

Dev-C++Dev-C++

Screen shot of the Dev-C++ Integrated Development Environment

Program Editing Area

Project and Class Area

Menu BarTool Bar

Page 4: Using Dev-C++ - ssucet.orgjgallaher/download/etec102/UsingDev-C++.pdf · What Is Dev-C++ Dev-C++ is an integrated development environment for developing C and C++ projects It is a

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

Page 5: Using Dev-C++ - ssucet.orgjgallaher/download/etec102/UsingDev-C++.pdf · What Is Dev-C++ Dev-C++ is an integrated development environment for developing C and C++ projects It is a

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.

Page 6: Using Dev-C++ - ssucet.orgjgallaher/download/etec102/UsingDev-C++.pdf · What Is Dev-C++ Dev-C++ is an integrated development environment for developing C and C++ projects It is a

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”

Page 7: Using Dev-C++ - ssucet.orgjgallaher/download/etec102/UsingDev-C++.pdf · What Is Dev-C++ Dev-C++ is an integrated development environment for developing C and C++ projects It is a

Step 2: Enter/Edit Program CodeStep 2: Enter/Edit Program Code

Text Edit Area - similar to a wordprocessor.

Program code.

Page 8: Using Dev-C++ - ssucet.orgjgallaher/download/etec102/UsingDev-C++.pdf · What Is Dev-C++ Dev-C++ is an integrated development environment for developing C and C++ projects It is a

Step 3: Save the ProgramStep 3: Save the Program

Save Options. (Note that the “Save As”option brings up the “Save File” dialog box.)

Page 9: Using Dev-C++ - ssucet.orgjgallaher/download/etec102/UsingDev-C++.pdf · What Is Dev-C++ Dev-C++ is an integrated development environment for developing C and C++ projects It is a

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

Page 10: Using Dev-C++ - ssucet.orgjgallaher/download/etec102/UsingDev-C++.pdf · What Is Dev-C++ Dev-C++ is an integrated development environment for developing C and C++ projects It is a

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

Page 11: Using Dev-C++ - ssucet.orgjgallaher/download/etec102/UsingDev-C++.pdf · What Is Dev-C++ Dev-C++ is an integrated development environment for developing C and C++ projects It is a

Step 4c: Successfully Compiled ProgramStep 4c: Successfully Compiled Program

Page 12: Using Dev-C++ - ssucet.orgjgallaher/download/etec102/UsingDev-C++.pdf · What Is Dev-C++ Dev-C++ is an integrated development environment for developing C and C++ projects It is a

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.

Page 13: Using Dev-C++ - ssucet.orgjgallaher/download/etec102/UsingDev-C++.pdf · What Is Dev-C++ Dev-C++ is an integrated development environment for developing C and C++ projects It is a

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.