Using the Turbo C++ Integrated Development Environment (IDE)

Similar documents
Creating a Simple Visual C++ Program

Basic Computer Skills for Beginners. Mesa Regional Family History Center

Windows XP Pro: Basics 1

Getting Started on the Computer With Mouseaerobics! Windows XP

AT&T Global Network Client v6.8.0 and Passport IP Setup Instructions for Broadband VPN Access

3 IDE (Integrated Development Environment)

Computer Programming In QBasic

Introduction to the UNIX Operating System and Open Windows Desktop Environment

WORDPAD TUTORIAL WINDOWS 7

Introduction to MS WINDOWS XP

XRD CONVERSION USER S MANUAL

Getting Started with the Cadence Software

Windows 95. 2a. Place the pointer on Programs. Move the pointer horizontally to the right into the next window.

Windows 7 for beginners

Introduction to the use of the environment of Microsoft Visual Studio 2008

r-one Python Setup 1 Setup 2 Using IDLE 3 Using IDLE with your Robot ENGI 128: Introduction to Engineering Systems Fall, 2014

Quick Guide. Passports in Microsoft PowerPoint. Getting Started with PowerPoint. Locating the PowerPoint Folder (PC) Locating PowerPoint (Mac)

Microsoft Word Basics Workshop

Notepad++ The COMPSCI 101 Text Editor for Windows. What is a text editor? Install Python 3

Division of School Facilities OUTLOOK WEB ACCESS

Windows File Management A Hands-on Class Presented by Edith Einhorn

Appendix K Introduction to Microsoft Visual C++ 6.0

Computer Basics: Tackling the mouse, keyboard, and using Windows

IT Quick Reference Guides Using Windows 7

Microsoft Windows Overview Desktop Parts

Connection to USOE Terminal Server 3/30/2006

BIGPOND ONLINE STORAGE USER GUIDE Issue August 2005

What is File Management. Methods for Categorizing Data. Viewing Data on a Computer

Introduction to SketchUp

Welcome to GAMS 1. Jesper Jensen TECA TRAINING ApS This version: September 2006

Biopac Student Lab BASIC TUTORIAL. BIOPAC Systems, Inc. Version 3.0.3

Instructions for Importing (migrating) Data

Using SSH Secure Shell Client for FTP

Using Microsoft Project 2000

Excel macros made easy

This Manual contains the following How To information:

Running your first Linux Program

Presentations and PowerPoint

Using Windows CE Applications in the Pathfinder

Internet Explorer 7. Getting Started The Internet Explorer Window. Tabs NEW! Working with the Tab Row. Microsoft QUICK Source

Passport installation Windows 8 + Firefox

HIT THE GROUND RUNNING MS WORD INTRODUCTION

This activity will guide you to create formulas and use some of the built-in math functions in EXCEL.

INTRODUCTION TO COMPUTER CONCEPTS CSIT 100 LAB: MICROSOFT POWERPOINT

Malwarebytes Anti-Malware 1.42

Getting Started with Command Prompts

HogPC. Introduction to HogPC

Exercise 4 - Practice Creating Text Documents Using WordPad

Windows 8.1 User Guide

File Management Windows

In this session, we will explain some of the basics of word processing. 1. Start Microsoft Word 11. Edit the Document cut & move

CS 103 Lab Linux and Virtual Machines

Training Manual. Version 6

Getting Started with Citrix Remote Connectivity Service

Activation Key usage and Windows 7 Professional installation guide

KEYBOARD SHORTCUTS. Note: Keyboard shortcuts may be different for the same icon depending upon the SAP screen you are in.

Profit Developers, Inc. (PDI) 2015 SAXTAX Software Installation Guide

Installing Sun's VirtualBox on Windows XP and setting up an Ubuntu VM

Vodafone PC SMS (Software version 4.7.1) User Manual

AARP Tax-Aide Helpful Hints for Using the Volunteer Excel Expense Form and Other Excel Documents

Win8 Networking FinishLynx with Meet Management Technical Support Guide

Microsoft Excel 2010 Linking Worksheets and Workbooks

How to Compile, Link, and Execute C or C++ Codes Using Microsoft Visual C++

edocfile Capture to Command Line Manual Revised 9/4/2006 Call

Fleet Maintenance Software

Getting to know Windows 8

User Manual. DG LINK Application Program This document applies to firmware version 2.00 and above.

Passport Installation. Windows 8 + Internet Explorer 10

Office 365 Training. Contents

ADVANCED OUTLOOK 2003

How to Concatenate Cells in Microsoft Access

In this example, Mrs. Smith is looking to create graphs that represent the ethnic diversity of the 24 students in her 4 th grade class.

5.4.8 Optional Lab: Managing System Files with Built-in Utilities in Windows 7

Table of Contents. Changing Your Password in Windows NT p. 1. Changing Your Password in Alpha Connection.. pp. 1-3

CATIA Basic Concepts TABLE OF CONTENTS

Operating Systems. and Windows

Passport Installation. Windows XP + Internet Explorer 8

Troubleshooting Guide

Lesson 1 - Creating a C18 Project with MPLAB

Microsoft Excel Introduction to Microsoft Excel 2007

Introduction. POP and IMAP Servers. MAC1028 June 2007

warpct.com Basic Computer Skills MS Windows XP Workbook courseware by WARP! Computer Training

Mapping ITS s File Server Folder to Mosaic Windows to Publish a Website

Employee Manual Development Tool Version 7.0. User Guide

Lecture 2 Mathcad Basics

Lab: Data Backup and Recovery in Windows XP

Embroidery Fonts Plus ( EFP ) Tutorial Guide Version

Introduction to Windows XP Operating System

GETTING STARTED TABLE OF CONTENTS

Introduction To Microsoft Office PowerPoint Bob Booth July 2008 AP-PPT5

FILE MANAGEMENT. About this Document Words in bold

Capture desktop image to Clipboard. Display contextual Help Window. Rename.

Using Windows XP and File Management Handout (Staff)

Using Microsoft Word. Working With Objects

Loss of data can happen in many ways. One of the most common causes is hard drive failure. Hard drives can die without warning.

AN INTRODUCTION TO STAROFFICE WRITER

PowerPoint 2013: Basic Skills

SQL Server 2005: Report Builder

Steps to Create a Database

ZoomText 10.1 for Windows 8 Quick Reference Guide Addendum

Transcription:

Chapter 1 Computer Science w/ C++ Name: Guided Lab (v. 2.0) Mr. Ferwerda Using the Turbo C++ Integrated Development Environment (IDE) A. Entering Borland Turbo C++ 3.0: two methods: 1) From Windows, click on the Turbo C++ shortcut icon. 2) If the shortcut doesn t exist, from the Start Menu, choose the Run option and type: C:>\tc\bin\tc Once started, the Turbo C++ Integrated Environment opens up the desktop, and may open a new (or whatever was last used) program into the edit window, and/or open the message window in which compiler and error messages appear. It also contains a menu bar on the top of the screen, scroll bars on the right and bottom, and a status line at the bottom that shows keyboard shortcuts or other information about the menus. B. The Turbo C++ Integrated Debugging Environment (IDE) Window Close Box Menu Bar Edit Window Status Line Message Window Scroll Bars

Comp. Sci. w/ C++: Ch. 1 Turbo C++ IDE Guided Lab (v.2.0) page 2 C. Using the Turbo C++ Main Menu 1. To access the main menus from the menu bar (one of three methods): Alt (hold down) + first letter of menu F10 + first letter of menu mouse (put cursor on menu title and click the left mouse button) 2. Write down the options listed under each of the following menus: File Edit Run Compile 3. The Status Line Open the File Menu and look at the choices. What does the status line say when each of the following options are highlighted: New Open Save Save As Print DOS Shell D. The Edit Window 1. Use the New option under the File Menu to create a new program edit window. a. What is the name of the new program? b. Create another new program. What is its name? c. What do you notice about the way the edit windows of each of these programs are arranged? d. To close the edit windows, click the mouse on the green square in the upper left corner of each program's edit window. Close all the programs now. You should be left with a blank desktop.

Comp. Sci. w/ C++: Ch. 1 Turbo C++ IDE Guided Lab (v.2.0) page 3 E. Creating a New Program 1. Create a new program edit window, and then type in the following program exactly as is shown below, using the same indenting, capitialization, and spelling (with the exception of the first line, in which you need to put your name after the double slash): // Please type your name here // My First Program #include <iostream.h> int main() { cout << "Hello, there!\n"; COUT << "\n"; cout << "Welcome to Turbo C++\n" Cout << \n; cout < "Good Bye!\n; } return 0; 2. The program shown in the edit window is called the source code. As you type, notice that different words and symbols automatically appear in different colors. 3. Save the source code of your program on your auxiliary memory device by using either the File Menu or by pressing F2. (Be sure to save to your auxiliary memory, not the hard drive.) If using a floppy disk, name the file: A:\FIRST.CPP If using a flash drive, name the file: E:\Cfiles\FIRST.CPP (use E: or F: ) F. Compiling a Program 1. Compile the program to create the object code (the machine language version of the program). You can compile the program by using either the Compile option in the Compile Menu, or by pressing Alt + F9. a. What happened when you tried to compile the program? How many error messages did you received? (Be sure to use the message scroll bar to see all of them!) Write the first error message here: Write the second error message here: b. Fix the first error indicated by changing COUT to all lower case letters (at the beginning of second statement after the opening french brace - { - symbol.) c. Fix the second error indicated by putting a semi-colon at the end of third statement after the opening french brace.)

Comp. Sci. w/ C++: Ch. 1 Turbo C++ IDE Guided Lab (v.2.0) page 4 2. Try to compile the program again. What happened? How many error messages did you received this time? How many errors occurred on line 11? (Fix the errors by replacing Cout with cout (all lower case), and by putting quotes around the \n on the same line.) 3. Keep trying to compile the program until all of the errors are fixed. (HINT: look at the previous lines of code to see if you can fix the errors left there is only one more line that has some errors.) Record the corrected line of code below. (If you absolutely cannot fix the errors, please ask for help.) The program will be free of syntax errors when it says SUCCESS at the bottom of the compile window. Be sure to save your program again once it compiles successfully! Corrected line: G. Running a Program 1. To run the compiled program use the Run option under the Run Menu, or press Ctrl + F9. 2. Run FIRST.CPP now. a. The output goes to the user screen for a brief period of time, and then returns you to the edit window the user screen flashes up for only a moment. b. To see the user screen again, press Alt + F5, or use the User Screen option under the Window Menu at the right of the menu bar. What do you see on the screen? Pressing any key will then return you to the edit window. H. Toggling between Windows and Turbo C++ You can change the Turbo C++ to appear as a separate window on the Windows screen by typing Alt + Enter. This allows you to access other Windows programs, including programs like Notepad, as well as access to My Computer and the file structure of your auxiliary memory device. Please try it now. To return Turbo C++ to the full screen display, once again type Alt + Enter. I. Printing the Source Code on the Printer A hardcopy is a paper listing of your program's source code. Unfortunately, you cannot use the Print option of the File Menu in this computer lab. To make a hardcopy of FIRST.CPP, you need to open the file in Notepad, and then print it. (To access Notepad, recall what you did in part H. of this worksheet.) You will need to hand in this hardcopy with this worksheet when you are finished.

Comp. Sci. w/ C++: Ch. 1 Turbo C++ IDE Guided Lab (v.2.0) page 5 J. Changing the Directory from which you are working 1. To change the directory or disk from which you are working, use the Change dir... option of the File Menu. Right now, change the directory: If using a floppy disk, change directory to: A:\ If using a flash drive, change directory to: E:\Cfiles\ (use E: or F: ) Notice what happens to the file name at the top of the Edit Window it no longer shows the folder path with the file name. NOTE: This is a step you will ALWAYS do when you enter Turbo C++ from now on; it will prevent you from accidentally saving programs to the hard drive and instead save them to your disk or flash drive. 2. Now, rerun the program FIRST.CPP, and watch the light on the floppy drive or your flash drive. What happened?. Congratulations, you just created an executable version of the program on your disk! K. Loading in a Program from Disk 1. To load a program from your disk, use the Open option under the File Menu, or press F3. Try to load in the program GREETING.CPP from your disk now. Be sure that you are trying to load from the correct drive and folder; if not, be sure to change the directory by typing A:\ or E:\Cfiles\ and press the Enter key to activate the disk drive. Use the mouse or the cursor keys to highlight the correct file name, or just type the file name. 2. Try running the program GREETING.CPP without compiling it first. Describe what happened. 3. Close GREETING.CPP right now, so that the edit window for FIRST.CPP is again visible. L. Files on your disk 1. In the File menu, choose the Open option, and in the Name box enter: *.* This should show you the names of all the files on your disk. Write the names of all the files that are on your disk here: 2. You should notice that one of the files has an extension.bak. This is a backup version of the program from the previous time you saved it. The updated version gets the.cpp extension. 3. The other files have extensions of.obj (the object code) and.exe (the executable code)

Comp. Sci. w/ C++: Ch. 1 Turbo C++ IDE Guided Lab (v.2.0) page 6 M. Exiting Turbo C++ 1. To exit Turbo C++, use the Quit option under the File Menu, or press Alt + X. 2. Try exiting now. The computer may inform you that changes were made to the program FIRST.CPP. Tell the computer you wish to save the changes. This is a nice feature of Turbo C++ that helps you avoid losing updated programs. You should always exit Turbo C++ this way before turning off the computer s power. N. Using the DOS Shell 1. The DOS Shell allows the user access to DOS without having to quit Turbo C++ and close all program files. To shell out to DOS, use the DOS Shell option under the File Menu at the top of the screen. Use the DOS Shell now; this takes you to the command prompt. 2. Look at the directory for your auxiliary device; at the command prompt, type: dir a:\ or dir e:\cfiles\ You should notice a file called FIRST.EXE on the disk. This is the executable code that was saved on your disk when you last compiled the program FIRST.CPP. a. To run an executable program out of DOS, simply type the name of the program (the extension is not necessary) at the command prompt. If using a floppy disk, type: A:\FIRST If using a flash drive, name the file: E:\Cfiles\FIRST (use E: or F: ) What happened? b. Executable code is a nice feature of many high-level programming languages. It allows a person to run a program written in C++ (or Pascal, etc.) without having to have the C++ compiler. Most game or other application programs are written this way; only the executable code gets sold and cannot be changed by the user. c. A word of caution. It is best to compile a program to memory instead of disk, until the program is completely finished. This is because the executable code takes up quite a bit more disk space than the source code. 3. To get back into Turbo C++ from the DOS Shell, at the command prompt, type: exit This will return you to Turbo C++ with all the files open that were open when you shelled out to DOS. O. Finishing the Project You may now quit Turbo C++. Be sure to hand in: this worksheet with all the answers written down, and the hardcopy of the program FIRST.CPP that you made in section I of this worksheet.