Installing and Using Dev-C++

Similar documents
Installing and Using Xcode

Getting Started with Visual Studio

Engr 123 Spring 2018 Notes on Visual Studio

To complete this project, you will need the following folder:

MS Visual Studio.Net 2008 Tutorial

CS354 gdb Tutorial Written by Chris Feilbach

Lab: Supplying Inputs to Programs

Lab 2.1: Fixing a C++ program

Introduction. Key features and lab exercises to familiarize new users to the Visual environment

Storing Your Exercise Files

My First Command-Line Program

CSCI 161: Introduction to Programming I Lab 1a: Programming Environment: Linux and Eclipse

Click on the Start Icon. Click on All Programs

Lecture Programming in C++ PART 1. By Assistant Professor Dr. Ali Kattan

Do this by creating on the m: drive (Accessed via start menu link Computer [The m: drive has your login id as name]) the subdirectory CI101.

and 32 bit for 32 bit. If you don t pay attention to this, there will be unexpected behavior in the ISE software and thing may not work properly!

Overview. - General Data Types - Categories of Words. - Define Before Use. - The Three S s. - End of Statement - My First Program

Lab 4: Introduction to Programming

Saleae Device SDK Starting a Device SDK Project on Windows Starting a Device SDK Project on Linux... 7

Mehran Sahami Handout #5 CS 106A September 26, 2018 Downloading Eclipse

Lab 0 Introduction to the MSP430F5529 Launchpad-based Lab Board and Code Composer Studio

Finalizing the Project

Quick Start Guide - Contents. Opening Word Locating Big Lottery Fund Templates The Word 2013 Screen... 3

Where Did My Files Go? How to find your files using Windows 10

5.5.3 Lab: Managing Administrative Settings and Snap-ins in Windows XP

CS 150 Lab 3 Arithmetic and the Debugger. Lab 3.0 We are going to begin using the Visual Studio 2017 debugger to aid with debugging programs.

Easy Windows Working with Disks, Folders, - and Files

Mehran Sahami Handout #5 CS 106A September 27, 2017 Downloading Eclipse

HOW TO BUILD YOUR FIRST ROBOT

Customizing DAZ Studio

Starting to Program in C++ (Basics & I/O)

ENCM 339 Fall 2017: Cygwin Setup Help

Course Folder and Files Instructions for download and use

This Tutorial is for Word 2007 but 2003 instructions are included in [brackets] after of each step.

1) Log on to the computer using your PU net ID and password.

Writing Code and Programming Microcontrollers

Java Program Structure and Eclipse. Overview. Eclipse Projects and Project Structure. COMP 210: Object-Oriented Programming Lecture Notes 1

First C or C++ Lab Paycheck-V1.0 Using Microsoft Visual Studio

In the first class, you'll learn how to create a simple single-view app, following a 3-step process:

CSCI 161: Introduction to Programming I Lab 1b: Hello, World (Eclipse, Java)

Part 1: Understanding Windows XP Basics

Instruction: Download and Install R and RStudio

Something we should know

Table of Contents. 3. Changing your Lotus Notes Password, page Choosing your Letterhead and Signature, page 6

Using X-Particles with Team Render

Code Check TM Software Requirements Specification

Getting started with Python

CIS220 In Class/Lab 1: Due Sunday night at midnight. Submit all files through Canvas (25 pts)

CSC111 Computer Science II

Setting Up a Linux Operating System

Using Microsoft Word. Text Editing

Arduino IDE Friday, 26 October 2018

BIZPRAC 12 GUIDE RE-INSTALLATION

MANAGING MAPLE DOCUMENTS Worksheet or Document mode

Tutorial: Creating a Gem with code

Before you begin, you need to make sure that IIS is installed on the runtime server.

SQL Server Express Installation Guide

HCA Tech Note 301: Using the CM15 with HCA and Windows 10

Getting Help in Microsoft Office

Outlook Web Access. In the next step, enter your address and password to gain access to your Outlook Web Access account.

Carleton University Department of Systems and Computer Engineering SYSC Foundations of Imperative Programming - Winter 2012

Site Owners: Cascade Basics. May 2017

QUICK EXCEL TUTORIAL. The Very Basics

CS 150 Lab 10 Functions and Random Numbers

CST8152 Compilers Creating a C Language Console Project with Microsoft Visual Studio.Net 2010

Adding content to your Blackboard 9.1 class

2. Click on the Launch button and select Terminal. A window will appear which looks like:

1. Introduction EE108A. Lab 1: Combinational Logic: Extension of the Tic Tac Toe Game

Café Soylent Green Chapter 12

How to set up SQL Source Control The short guide for evaluators

How to make a Work Profile for Windows 10

Lab 2 Building on Linux

Program Organization and Comments

Building And Integrating CppUnitLite in Eclipse on Linux

To complete this activity, you will need the following files:

Chapter 1 is where you get your feet wet. Don t be shy. Walk right to the

INTRODUCTION ACCESS 2010

Practicum 5 Maps and Closures

Locating Excel Output Files

COMP s1 Lecture 1

INFORMATICS LABORATORY WORK #2

A Document Created By Lisa Diner Table of Contents Western Quebec School Board October, 2007

CS 220: Introduction to Parallel Computing. Beginning C. Lecture 2

When the player powers up you will first see a CeeNee loading screen followed by the Orchid screen seen below.

The Quick Access Toolbar can be either just below the Title Bar or, as in this case, just above the ruler.

Section 1: Let s Shake Off the Rust!

Mail Merge. To Use Mail Merge: Selecting Step by Step Mail Merge Wizard. Step 1:

Walkthrough Using the New CLR Interop Feature of Microsoft Dynamics AX

VISION BASICS. Introduction (note materials updated for Vision 6.8.0)

Setting up PyCharm Professional

Lecture (01) Getting started. Dr. Ahmed ElShafee

Spreading a Sample Across the Pads

Microsoft Office Outlook 2007: Intermediate Course 01 Customizing Outlook

Lab #1: A Quick Introduction to the Eclipse IDE

Lab 1 Introduction to UNIX and C

Lesson 2 Variables and I/O

Hello, World! in C. Johann Myrkraverk Oskarsson October 23, The Quintessential Example Program 1. I Printing Text 2. II The Main Function 3

Your . A setup guide. Last updated March 7, Kingsford Avenue, Glasgow G44 3EU

Using Devices with Microsoft HealthVault

assembler Machine Code Object Files linker Executable File

Transcription:

Installing and Using Dev-C++ 1. Installing Dev-C++ Orwell Dev-C++ is a professional C++ IDE, but not as big and complex as Visual Studio. It runs only on Windows; both Windows 7 and Windows 8 are supported. Note that Orwell is the successor to the Bloodshed version installed in some of the labs. This is a good choice if you don t plan to major in CS; it s a small download and easier to install. To download Orwell Dev-C++, start here: http://orwelldevcpp.blogspot.com/ Do *not* click the big DOWNLOAD button, that s a scam. Instead, scroll down, and I would recommend you download and install the first version listed as The setup which includes TDM-GCC 4.9.2 can be downloaded here. Run the setup program to install the IDE. part 1: Getting Started with the Dev-C++ Programming Environment The following steps outline how to properly create a C++ project on a Windows computer using Dev-C++. The exact details may be different based on the version of Dev-C++ you have installed, but the basic ideas are the same. These instructions are written for the computers in our labs, SELE 2249 and 2249F. First, open Dev- C++: Start menu, All Programs, Programming, Bloodshed Dev-C++, and select Dev-C++ : This will start the Dev-C++ program. The first step is to create a new project, so File menu, New >> Project: Prof. Joe Hummel Page 1 of 9

At this point, a new dialog window will open to collect the information that Dev-C++ needs to create a project. THIS IS THE MOST IMPORTANT STEP, and WHERE MOST FOLKS GET IT WRONG, so read carefully. First, here s what you should see: You MUST do 2 things. First, as shown below, click on the icon for Console Application to select it. Second, give your project a name use only letters and numbers, no spaces and no special characters are allowed. So how about Testing123, like this: Click the OK button this is step 1 of 2, and so after you click the OK button a second dialog window will open. THIS STEP IS EQUALLY IMPORTANT, so read carefully. Here s what the 2 nd dialog window should look like it s a typical Windows Save As dialog: You are being asked where to save the project / program you are about to write. This is HUGELY IMPORTANT if you aren t careful, you won t be able to find your program when you are done! By default, Dev-C++ will Prof. Joe Hummel Page 2 of 9

save all files in your DOCUMENTS folder, which is perfectly fine. To maintain some sense of organization, what you want to do is create a folder for every project / program you write. In the dialog window, there is a New Folder button as shown below: Click the New Folder button, and create a new folder give the folder the same name as your project, in this case Testing123 : << continued on next page >> Prof. Joe Hummel Page 3 of 9

NEXT, double-click to open this folder and navigate down one level, into the folder you just created: Now, anything you save will end up in your new Testing123 folder. Go ahead and click the SAVE button to save the Dev-C++ project (.dev) file. You have now properly created a Dev-C++ project. After clicking SAVE, Dev-C++ will now create the skeleton of a valid C++ program, and you can start programming. Here s what you should see, though you may see something different based on the version of Dev-C++ you are working with: Ignore the int argc, char *argv[] you see as part of the main( ) function definition. In the lab, Dev-C++ will auto-generate some code for keeping the console window open when you run your program: Prof. Joe Hummel Page 4 of 9

} system("pause"); return EXIT_SUCCESS; Leave this code at the end of main( ); when we run your program, this will cause the system to wait for you to press a key before closing the window, giving you time to see your program s output. [ Note: if you write code in Dev-C++ and then copy-paste this code into ideone.com or codelabs, you will need to *delete* these two lines and replace with return 0; as we normally do in class. ] Immediately save what Dev-C++ has generated by clicking the small Save All toolbar button as shown below: When you click Save All, you ll be asked to save your main.cpp file this file represents your program. It will be saved in your Testing123 folder by default, which is exactly where you want it. So click SAVE : You are now ready to start programming. Prof. Joe Hummel Page 5 of 9

part 2: Programming in Dev-C++ At this point you should be looking at the simple C++ program generated by Dev-C++. The right-most window pane is the editor, go ahead and edit the program, adding using namespace std; as we normally do: Let s write a simple program in C++ Modify the main() function to input 2 real numbers from the keyboard, compute their average, and output the result. Go ahead and write the code When you want to run your program, you perform two steps: (1) compile, and if there are no errors, then (2) run. To compile your program, use the Execute menu, and select Compile as shown below: Error messages will appear in a window pane that appears along the bottom you may also get some warnings about skipping incompatible, you can safely ignore those. Fix any errors and compile again; repeat until all errors are fixed. Prof. Joe Hummel Page 6 of 9

To run your program, use the Execute menu, and select Run a console window should open, looking something like this: Your program is now running and in this case, waiting for input. Enter 2 numbers, and your program should output the average: Excellent! Press ENTER to close the console window, and then exit out of Dev-C++. part 3: Files created by Dev-C++ At this point Dev-C++ should be closed. Open your Documents folder: the quickest way is Start menu, and then select Documents underneath your user name in the menu that open (top-right of menu area): In Documents, you should see your Testing123 folder: Prof. Joe Hummel Page 7 of 9

Open the Testing123 folder to see what Dev-C++ created: Your C++ program is in the file main.cpp this is the MOST IMPORTANT FILE, and represents your intellectual work. If you need to submit your program for grading, submit this file main.cpp file. If you want to take your work with you when you leave the lab, either (a) copy the entire Testing123 folder, or (b) copy the main.cpp file. For example, you can attach main.cpp in an email to yourself, or copy the folder / file to a USB drive. The other important file is the Dev-C++ project file, the one with the.dev extension. When you want to open Dev-C++ and start working on your program, this.dev file is the one you need to open. Unfortunately, you cannot double-click on the file and startup Dev-C++, at least it doesn t work in the labs. Instead, start Dev- C++ via the Windows Start menu, and then when it s open, drop the File menu, and select Open : << continued on next page >> Prof. Joe Hummel Page 8 of 9

Navigate to the Testing123 folder, open, and select the.dev file: Click the OPEN button, and Dev-C++ will re-open your project, load your C++ program file, and you re ready to start programming again. Prof. Joe Hummel Page 9 of 9