lab00-getting started with vc2005 1. launch vs 2005 launch visual studio 2005 – start > all...

Post on 06-Jan-2018

222 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

Create Project - MyProject New Project – Create: Project Existing Project – Open: Project 3

TRANSCRIPT

Lab00-Getting Started with VC2005

1

Launch VS 2005

• Launch Visual Studio 2005– Start > All Programs > Microsoft Visual Studio

2005 > Microsoft Visual Studio 2005

– Select C++ Environment

2

Create Project - MyProject

New Project – Create: ProjectExisting Project – Open: Project

3

1) Make sure it is Visual C++

2) Select Win32

3) Select Win32 Console Application

4) Enter project name MyProject

5) Enter location

6) OK

4

1) Select Console application

2) Select Empty Project

3) Finish

1) Next

5

Create a .c file in MyProject

6

Right-click

7

2) Select C++ File

3) Enter file name, e.g.: Lab1 – avoid space or . (dot)

4) Don’t change the location – the file will be kept in your project location

1) Make sure it is Visual C++

8

EditorFile and Class Information

Message Window: Compilation and Error Message

Write this code in Lab1.cpp

9

Compile (Ctrl+F7) - compiling

10

Check the Message Window

11

If no error, Build Solution (F7) - Linking.

12

13

Check the Message Window

If no error, run your program (Ctrl+F5)

14

Dealing with Compilation Error

15

1) Double click the first error

2) Arrow indicating line of error

Total no of error

Line number

If you copy code from Ms Word, and paste it in Visual Cdon’t forget to type again the quote symbol

Show line number in VS

16

Tools > Options

Expand “Text Editor” > Select “C/C++” > Check Line numbers checkbox > OK

It is better to show line number.Easy for the lecturer to guide you where is the location of the errorby focusing on the line number

Detach a file from workspace

17

Do not compile if there are more than 1 .c fileslisted in Source FilesYou need to remove the all file(s) except the file thatyou want to compile

Attach an existing file from workspace

18

top related