Creating a Simple Visual C++ Program

Similar documents
Appendix K Introduction to Microsoft Visual C++ 6.0

Appendix M: Introduction to Microsoft Visual C Express Edition

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

Visual Studio 2008 Express Editions

Lab 2 - CMPS 1043, Computer Science I Introduction to File Input/Output (I/O) Projects and Solutions (C++)

3 IDE (Integrated Development Environment)

Microsoft Visual Studio 2010 Instructions For C Programs

Windows XP Pro: Basics 1

William Paterson University Department of Computer Science. Microsoft Visual C++.NET Tutorial Spring 2006 Release 1.0

Install the Production Treasury Root Certificate (Vista / Win 7)

Maximizing the Use of Slide Masters to Make Global Changes in PowerPoint

Contents. Dianne Harrison Ferro Mesarch

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

Getting Started on the Computer With Mouseaerobics! Windows XP

ITCS QUICK REFERENCE GUIDE: EXPRESSION WEB SITE

Instructions for creating a data entry form in Microsoft Excel

Mail Merge (Microsoft Office 2010)

PowerPoint 2013: Basic Skills

Steps to Create a Database

Visual C Tutorial

Instructions for Configuring a SAS Metadata Server for Use with JMP Clinical

Transitioning from TurningPoint 5 to TurningPoint Cloud - LMS 1

IT Quick Reference Guides Using Windows 7

MS Visual C++ Introduction. Quick Introduction. A1 Visual C++

Microsoft PowerPoint 2010

INTRODUCTION TO COMPUTER CONCEPTS CSIT 100 LAB: MICROSOFT POWERPOINT

Completing Baseline s Site Survey Request Form

Creating Basic HTML Forms in Microsoft FrontPage

1. Set Daylight Savings Time Create Migrator Account Assign Migrator Account to Administrator group... 4

Creating Personal Web Sites Using SharePoint Designer 2007

AVDC Document Management System Getting Started

WebEx Remote Access User s Guide

Getting Started with WebEx Access Anywhere

Introduction to Windows XP

Introduction to MS WINDOWS XP

Affiliated Provider Billing/Coding

Working with SQL Server Integration Services

Using Microsoft Visual Studio API Reference

Choosing your Preferred Colours in Windows

Sample Table. Columns. Column 1 Column 2 Column 3 Row 1 Cell 1 Cell 2 Cell 3 Row 2 Cell 4 Cell 5 Cell 6 Row 3 Cell 7 Cell 8 Cell 9.

HOW TO USE OIT VIA THE WEB

To successfully initialize Microsoft Outlook (Outlook) the first time, settings need to be verified.

LEARNING RESOURCE CENTRE. Guide to Microsoft Office Online and One Drive

ecstudent-ts Terminal Server How to Use

Microsoft PowerPoint 2011

QUICK START GUIDE EDI Claims Link for Windows version 3.1

ecfshome-ts Terminal Server How to Use

Delegate Access. In Lync 2013

Behavioral Health System

Working with Windows Handout

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

OUTLOOK WEB APP (OWA): MAIL

Converting Microsoft Access 2002 to Pipe-Delimited ASCII Text Files

Baylor Secure Messaging. For Non-Baylor Users

TAMUS Terminal Server Setup BPP SQL/Alva

Presentations and PowerPoint

Time Matters for Microsoft Outlook. Technology Preview User Guide

How to test and debug an ASP.NET application

Lab: Data Backup and Recovery in Windows XP

Importing Contacts to Outlook

Exercise 4 - Practice Creating Text Documents Using WordPad

Legal Notes. Regarding Trademarks KYOCERA Document Solutions Inc.

Word basics. Before you begin. What you'll learn. Requirements. Estimated time to complete:

How schedule AccuTRConsole to run every hour

[COGNOS DATA TRAINING FAQS] This is a list of frequently asked questions for a Cognos user

LEARNING RESOURCE CENTRE GUIDE TO OFFICE 365

Optimal Browser Settings for Internet Explorer Running on Microsoft Windows

eadvantage Certificate Enrollment Procedures

Preparing Documents in the STARS Database

Handout: Word 2010 Tips and Shortcuts

Using Microsoft Project 2000

Managing Contacts in Outlook

Introduction to Word 2007

ING USING HOTMAIL

Installing Windows Server Update Services (WSUS) on Windows Server 2012 R2 Essentials

Microsoft PowerPoint Tutorial

Customizing forms and writing QuickBooks Letters

CONTENTS. Introduction Outlook at a glance Configure Outlook 2010 on-campus Creating Folders Sorting s...

History Explorer. View and Export Logged Print Job Information WHITE PAPER

Microsoft PowerPoint 2008

NDA ISSUE 1 STOCK # CallCenterWorX-Enterprise IMX MAT Quick Reference Guide MAY, NEC America, Inc.

NETWORK PRINT MONITOR User Guide

Using SSH Secure Shell Client for FTP

BID2WIN Workshop. Advanced Report Writing

Microsoft Office. Mail Merge in Microsoft Word

Hosting Users Guide 2011

Delegate Access. In Lync 2010

GRS Advantage Website User Reference Guide

Lab - Data Backup and Recovery in Windows XP

OUTLOOK ANYWHERE CONNECTION GUIDE FOR USERS OF OUTLOOK 2010

Shutting down / Rebooting Small Business Server 2003 Version 1.00

Fleet Maintenance Software

BIGPOND ONLINE STORAGE USER GUIDE Issue August 2005

Part II Acrobat 8 Professional

Database Program Instructions

TM Online Storage: StorageSync

Module 1. 4 Login-Send Message to Teacher

Using Windows XP and File Management Handout (Staff)

Student Manager s Guide to the Talent Management System

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

Transcription:

CPS 150 Lab 1 Name Logging in: Creating a Simple Visual C++ Program 1. Once you have signed for a CPS computer account, use the login ID and the password password (lower case) to log in to the system. Change your password when prompted to do so. If you are not prompted, press Ctrl-Alt-Del once your system is booted, and then choose Change password from the options that will appear. Be sure to remember the new password you select. If you forget your password, you will have to ask the system administrator (Mr. Dean Halter) to reset it. His office is located in the back of Anderson 131; his office hours are 8-5 Monday through Friday. Creating and running a C++ program: 1. Open the Visual Studio environment by clicking the Start button, then choosing Programs, then choosing Microsoft Visual Studio.Net 2003 Microsoft Visual Studio.Net 2003. You should see this window: 2. Click the New Project button which appears in the lower left corner of the Projects tab.

3. From the New Project dialog box (shown below), do the following: choose Visual C++ Projects, Win32 from the left pane choose Win32Console Application from the right pane In the Name box, enter lab1 In the Location box, enter c:\temp (rather than type the location, you can click the Browse button, find the c:\temp folder, and click on it) Click OK 4. From the Win32 Application wizard dialog box that appears, click on the Application Settings tab and choose Console application and Empty Project, as shown below, then click the Finish button.

Add a file to your solution: 1. From the Tool bar, choose File, Add New Item. From the Add New Item dialog box (shown below), do the following: choose C++ File (.cpp) In the name box, type lab1 or lab1.cpp (if you just type lab1, the.cpp will be appended to your filename automatically) click the Open button. 2. An empty editing window appears; type in the code exactly as it appears on the following page (except replace [your name] with your actual name).

//lab1.cpp /*********************************************************************** * Author: [your name] * * Lab: 1 * * Class: CPS 150-01 * * Instructor: Dr. Saverio Perugini * * Date: August 26, 2004 * * * * This program displays messages to the screen. * * * ***********************************************************************/ #include <iostream> using namespace std; main() { cout << Lab 1 for << [your name] << endl; cout << This is my first C++ program. << endl; cout << Have fun dude! << endl }

Compiling your program: 1. To compile and create an executable program, choose Build from the menu bar, and then select Build Solution as shown below. After attempting to build your program, the compiler should have detected syntax errors, a listing of which appear in a new window at the bottom of your screen, as shown below: Have your instructor initial here to verify that your screen matches the one above:

2. Move your mouse pointer to the first error message, and double-click anywhere within the message. Your cursor will be be placed in the code window, to the left of the line containing the error. 3. Correct the error. 4. Again from the Build menu, choose Build Solution. Repeat steps 2-4 until your program is free from errors. When error-free, an Output window as shown below should appear (you may need to re-size the Output window and/or use the scroll bars to view the complete message): Have your instructor initial here to verify that your screen matches the one above:

Executing your program: 1. To execute, choose Debug from the menu bar, and then select Start Without Debugging as shown below: An output window as shown below should appear (except your actual name should appear instead of [your name]): Have your instructor initial here to verify that your program output was correct:

Printout your output: You can capture the DOS window from the previous step and then print it within Microsoft Word by following these steps: 1. Change the background and foreground colors to conserve ink: Move the mouse pointer to the title bar of the DOS window, right click, and choose Properties: From the dialog box that appears, select the Colors tab, select White for the Screen Background and Black for the Screen Text. Click OK. Choose the second option on the Apply Properties dialog box, and click OK.

The DOS window should now appear as below. 2. Capture this window by holding the Alt key down while you press the Print Screen key on the keyboard. This places a copy of the active window in the clipboard. 3. Open Microsoft Word (Click on Start, select Programs, select Microsoft Word). 4. Select Edit, Paste to place your output window in the Microsoft Word document. 5. Select File - Print to print the document. 6. Before clicking OK to print, check the printer name that appears in the dialog box. The printer name should include 21A as part of its name. If you do not see 21A in the printer

name, click on the drop-down arrow next to the printer name, and select the appropriate printer (the one that has 21A as part of its name). Now click OK to print the file. Your printout will be available in the printer room at the back of MH21A. 7. Close Microsoft Word and close your DOS output window.

Print your code: 1. Within Visual Studio, be sure your code window is the active window (the blinking cursor anywhere within your code window indicates that it is active). 2. From the File menu, choose Print. Verify that the printer name is the printer in 21A and click OK. Your printout will be available in the printer room at the back of MH21A. Have your instructor sign here to verify that you successfully printed your output window and your source code: Save your solution to your network account: In this lab, you will always use c:\temp for your programs because it is much faster than working with files on the network drive. However, when you log out, all files in c:\temp are deleted. Therefore, you must copy your work to your network account folder before logging out. Follow these steps: 1. Close Visual Studio. (Since Visual Studio automatically saves all files when your solution is Built, it is not necessary to save first.) 2. Open Windows Explorer (right click the Start button and choose Explore). 3. In the left pane, click on the c:\temp folder. Your lab1 folder should be visible within this folder. 4. Open the lab1 folder and delete the Debug folder within it. This folder contains the executable program file, which is very large. The folder will be automatically re-created the next time you open your program, so it is not necessary that it be saved. 5. Copy the entire lab1 folder to your Z: drive (which should have your account number as the part of the drive name). If you are not sure how to do this, ask your instructor for help. Have your instructor sign here to verify that you successfully copied your program folder (minus the debug folder) to your Z: drive:

Log off of the computer Click the Start button, choose Shut Down, and choose Log off. Turn in: Your output and code printouts.