Here’s how to start the Microsoft Visual C++ program; click on start, then programsclick on start, then programs Choose Microsoft Visual C++ or Microsoft.

Slides:



Advertisements
Similar presentations
Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
Advertisements

 Use the Left and Right arrow keys or the Page Up and Page Down keys to move between the pages. You can also click on the pages to move forward.  To.
Chapter 1 These slides for CSE 110 Sections are based in part on the textbook-authors’ slides, which are copyright by the authors. The authors state that.
COSC 120 Computer Programming
Your First C++ Program Aug 27, /27/08 CS 150 Introduction to Computer Science I C++  Based on the C programming language  One of today’s most.
SUNY Morrisville-Norwich Campus-Week 12 CITA 130 Advanced Computer Applications II Spring 2005 Prof. Tom Smith.
CS 1400 Using Microsoft Visual Studio 2005 if you don’t have the appropriate appendix.
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 1 Introduction.
Using C Programming Language.  The programs that run on a computer are referred to as software.  You’ll learn key programming methodology that are enhancing.
Using C Programming Language.  The programs that run on a computer are referred to as software.  You’ll learn key programming methodology that are enhancing.
Microsoft Visual Basic 2012 CHAPTER ONE Introduction to Visual Basic 2012 Programming.
CHAPTER 1 XNA Game Studio 4.0. Your First Project A computer game is not just a program—it is also lots of other bits and pieces that make playing the.
1 ENG236: ENG236: C++ Programming Environment (2) Rocky K. C. Chang THE HONG KONG POLYTECHNIC UNIVERSITY.
CCSA 221 Programming in C CHAPTER 2 SOME FUNDAMENTALS 1 ALHANOUF ALAMR.
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
Chapter 2 Build Your First Project A Step-by-Step Approach 2 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
A First Program Using C#
Introduction to VB.NET Tonga Institute of Higher Education.
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 11 1 Microsoft Office Access 2003 Tutorial 11 – Using and Writing Visual Basic for Applications.
CS Tutorial 1 Getting Started with Visual Studio 2012 (Visual Studio 2010 are no longer available on MSDNAA, please choose Visual Studio 2012 which.
Intro to C++. Getting Started with Microsoft Visual Studios Open Microsoft Visual Studios 2010 Click on file Click on New Project Choose Visual C++ on.
History of C and C++ C++ evolved from C ANSI C C++ “spruces up” C
What is a Computer? An, electrical machine, that can be programmed to accept data (input), process it into useful information (output) and store it away.
Big Java by Cay Horstmann Copyright © 2008 by John Wiley & Sons. All rights reserved. Chapter One: Introduction.
Computer Programming A program is a set of instructions a computer follows in order to perform a task. solve a problem Collectively, these instructions.
A1 Visual C++.NET Intro Programming in C++ Computer Science Dept Va Tech August, 2002 © Barnette ND & McQuain WD 1 Quick Introduction The following.
1 Chapter 1 Introduction to Java. 2 History of Java Java Originally for _________________________ devices Then used for creating Web pages with __________________________.
Computer Programming TCP1224 Chapter 3 Completing the Problem-Solving Process and Getting Started with C++
CPS120: Introduction to Computer Science Compiling Your Programs Using Visual C++
Just as there are many human languages, there are many computer programming languages that can be used to develop software. Some are named after people,
Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.
Getting Started with MATLAB 1. Fundamentals of MATLAB 2. Different Windows of MATLAB 1.
Guide to Programming with Python Chapter One Getting Started: The Game Over Program.
COMPUTER PROGRAMMING. A Typical C++ Environment Phases of C++ Programs: 1- Edit 2- Preprocess 3- Compile 4- Link 5- Load 6- Execute Loader Primary Memory.
Unit 1: Java and Eclipse The Eclipse Development Environment.
Chapter 1 Introduction Chapter 1 Introduction 1 st Semester 2015 CSC 1101 Computer Programming-1.
CPS120: Introduction to Computer Science Compiling Your First Program.
Using Microsoft Visual Studio C++ Express 2005 Name: Dr Ju Wang Ashwin Belle Course Resource:
N from what language did C++ originate? n what’s input, output device? n what’s main memory, memory location, memory address? n what’s a program, data?
1 C++ Programming Basics Chapter 1 Lecture CSIS 10A.
I Power Higher Computing Software Development Development Languages and Environments.
Intermediate 2 Computing Unit 2 - Software Development Topic 2 - Software Development Languages and Environments.
Chapter 1 Introduction. Chapter Goals To understand the activity of programming To learn about the architecture of computers To learn about machine code.
The Development Process Compilation. Compilation - Dr. Craig A. Struble 2 Programming Process Problem Solving Phase We will spend significant time on.
Brief Version of Starting Out with C++ Chapter 1 Introduction to Computers and Programming.
Chapter 11  Getting ready to program  Hardware Model  Software Model  Programming Languages  Facts about C++  Program Development Process  The Hello-world.
OCR A Level F453: The function and purpose of translators Translators a. describe the need for, and use of, translators to convert source code.
1 1 1 Introduction to Java. 2 History of Java Java – Originally for intelligent consumer-electronic devices – Then used for creating Web pages with dynamic.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Software Engineering Algorithms, Compilers, & Lifecycle.
Chapter 2 Build Your First Project A Step-by-Step Approach 2 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
Introduction to Programming By: Prof. Muhammad Abu Baker Siddique 2 nd Lecture 1.
Software Development Languages and Environments. Computer Languages Just as there are many human languages, there are many computer programming languages.
Chapter 1: Introduction to Computers and Programming
Chapter 2: The Visual Studio .NET Development Environment
Computer Terms Review from what language did C++ originate?
CSC201: Computer Programming
Introduction to Visual Basic 2008 Programming
Beginning C++ Programming
Chapter 1: An Overview of Computers and Programming Languages
1. Open Visual Studio 2008.
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
3.1 Basic Concept of Directory and Sub-directory
Computer Terms Review from what language did C++ originate?
Chapter 1 c++ structure C++ Input / Output
Presentation transcript:

Here’s how to start the Microsoft Visual C++ program; click on start, then programsclick on start, then programs Choose Microsoft Visual C++ or Microsoft Visual StudioChoose Microsoft Visual C++ or Microsoft Visual Studio Finally choose Microsoft Visual C (or Microsoft Visual C++ 6.0)Finally choose Microsoft Visual C (or Microsoft Visual C++ 6.0) Here’s how to start the Microsoft Visual C++ program; click on start, then programsclick on start, then programs Choose Microsoft Visual C++ or Microsoft Visual StudioChoose Microsoft Visual C++ or Microsoft Visual Studio Finally choose Microsoft Visual C (or Microsoft Visual C++ 6.0)Finally choose Microsoft Visual C (or Microsoft Visual C++ 6.0)

The opening screen for Microsoft Visual C++ Editing, compilation and execution environment. Tip of the Day is a feature that explains to you a helpful hint on a topic regarding the use of Visual C++ environment more efficiently. Click on the button Close of the window labeled Tip of the Day to start working in the environment.

WorkspacesProjects C++ Program Source files In Visual C++ The programs you develop are organized as follows; C++ source file A C++ program that implements a certain algorithm to solve a problem Project S ometimes in big programs one has to distribute the C++ source statements over multiple files, not only one. I n these cases all the files that logically make up one program must be collected together. A project is the folder in visual C++ where all pieces of the same program are stored. Workspaces In big big software development projects there may be a need to develop multiple big programs (i.e. multiple projects), for example, In a financial software package, you find Payroll, Accounts payable, Accounts receivable programs. A workspace is the way visual C++ allows us to collect related projects

The Visual C++ environment is split into three basic windows: Editing windowEditing window InfoViewing windowInfoViewing window Debugging windowDebugging window The Visual C++ environment is split into three basic windows: Editing windowEditing window InfoViewing windowInfoViewing window Debugging windowDebugging window Edititing Window Here you will type the C++ source program. You can do the normal operations you expect in any editor, for example, type new text, cut, copy, paste text, search for a word or phrase in your program etc. One useful feature of this editor is it color codes the different parts of a C++ statement to help you verify that your statement does not contain a syntax error(error because of violating a rule of the grammar of the C++ language). Edititing Window Here you will type the C++ source program. You can do the normal operations you expect in any editor, for example, type new text, cut, copy, paste text, search for a word or phrase in your program etc. One useful feature of this editor is it color codes the different parts of a C++ statement to help you verify that your statement does not contain a syntax error(error because of violating a rule of the grammar of the C++ language). InfoViewing window All Source programs in all projects that reside in the workspace currently open, are shown in this window for your reference as the programmer. InfoViewing window All Source programs in all projects that reside in the workspace currently open, are shown in this window for your reference as the programmer. Debugging window Here is where the results of compilation and linking of your program appear. For example if you have errors in compilation they appear in this window. Click on any error and the environment will point to you the line in your C++ source program that caused the error. Debugging window Here is where the results of compilation and linking of your program appear. For example if you have errors in compilation they appear in this window. Click on any error and the environment will point to you the line in your C++ source program that caused the error.

Using Microsoft Visual C++ Environment Scenario I The following slide illustrate a scenario for creating a new C++ source program from scratch, compiling it, and executing it. The steps are summarized as follows: Create New Source fileCreate New Source file This step allows a new C++ source file that will contain your program to be opened Editing & storing a C++ source program inside the project workspaceEditing & storing a C++ source program inside the project workspace In the editing window we will type the statements of a simple but complete C++ source program. Compiling & linking the C++ source program to produce the executable machine Compiling & linking the C++ source program to produce the executable machine language program language program The source program written in the C++ language is translated into a program that does the same exact thing but written in the machine language of the computer you are using. The later program is called the executable program since it can be run directly on the machine.(For example, if your machine has a Pentium processor translation will produce a program written in the Pentium processor’s instruction set) Executing the executable program Executing the executable program Basically, Visual C++ environment asks the Operating system to load the machine language instructions of your executable program and have them executed.

To create a new C++ source file ; Click with the mouse on the File menu.Click with the mouse on the File menu. Click on New Click on New To create a new C++ source file ; Click with the mouse on the File menu.Click with the mouse on the File menu. Click on New Click on New

Then on C++ Source File Click on Files

#include void main(){ const Pi= f; float area; float r; cout<<"Enter value for radius "; cin >>r; area = Pi*r*r; cout<<"Area equals "<<area<<endl; } #include <iostream.h> void main(){ const Pi= f; float area; float r; cout<<"Enter value for radius "; cin >>r; area = Pi*r*r; cout<<"Area equals "<<area<<endl; }

Here is yourC++ source programObserve the color of some words in the statements Here is your C++ source program. Observe the color of some words in the statements of your program is different, for example, the blue color is used to mark that the editor of your program is different, for example, the blue color is used to mark that the editor recognizes these asreserved words recognizes these as reserved words Here is yourC++ source programObserve the color of some words in the statements Here is your C++ source program. Observe the color of some words in the statements of your program is different, for example, the blue color is used to mark that the editor of your program is different, for example, the blue color is used to mark that the editor recognizes these asreserved words recognizes these as reserved words

Click on File, then Save As to save the C++ program in a C++ source file you name Click on File, then Save As to save the C++ program in a C++ source file you name

First choose that you save on the Floppy disk Type the name you want to give to the source file that will contain your C++ source program, say you’ll call it Area Type the name you want to give to the source file that will contain your C++ source program, say you’ll call it Area then click Save First choose that you save on the Floppy disk Type the name you want to give to the source file that will contain your C++ source program, say you’ll call it Area Type the name you want to give to the source file that will contain your C++ source program, say you’ll call it Area then click Save

Here we want to create a workspace and project to contain our source. We have to do this on the Hard disk because space limitation on the floppy disk will cause compilation and linking processes to fail. because space limitation on the floppy disk will cause compilation and linking processes to fail. Here’s what you need to do click File, then New, then Projects.click File, then New, then Projects. Choose Win32 Console ApplicationChoose Win32 Console Application Type a Project name for the project you are creating, best to use the same name as your C++ source fileType a Project name for the project you are creating, best to use the same name as your C++ source file Make sure the project is stored in a directory on the hard disk C:\, for example C:\TEMPMake sure the project is stored in a directory on the hard disk C:\, for example C:\TEMP Here we want to create a workspace and project to contain our source. We have to do this on the Hard disk because space limitation on the floppy disk will cause compilation and linking processes to fail. because space limitation on the floppy disk will cause compilation and linking processes to fail. Here’s what you need to do click File, then New, then Projects.click File, then New, then Projects. Choose Win32 Console ApplicationChoose Win32 Console Application Type a Project name for the project you are creating, best to use the same name as your C++ source fileType a Project name for the project you are creating, best to use the same name as your C++ source file Make sure the project is stored in a directory on the hard disk C:\, for example C:\TEMPMake sure the project is stored in a directory on the hard disk C:\, for example C:\TEMP

Click on Finish; we need An empty project

A new workspace called area, and a new project inside that workspace are created. Both the workspace and the project are stored as files on the hard disk, specifically in directory C:\TEMP A new workspace called area, and a new project inside that workspace are created. Both the workspace and the project are stored as files on the hard disk, specifically in directory C:\TEMP

Here you will add the C++ source file you created to the project area. This is necessary before you can compile or link your program. Move the pointer to the name of the project in the infoView windowMove the pointer to the name of the project in the infoView window click the right mouse buttonclick the right mouse button choose Add Files to Projectchoose Add Files to Project Here you will add the C++ source file you created to the project area. This is necessary before you can compile or link your program. Move the pointer to the name of the project in the infoView windowMove the pointer to the name of the project in the infoView window click the right mouse buttonclick the right mouse button choose Add Files to Projectchoose Add Files to Project

Determine that you want to add to the project the source file called area.cpp found on the floppy disk

Click Build then Compile Area.cpp. This causes the compiler to start translating the C++ source program into the machine language instructions Click Build then Compile Area.cpp. This causes the compiler to start translating the C++ source program into the machine language instructions

Click Build then Build area.cpp to perform the linking process for the resulting program form the compiler To obtain the executable (machine language version of your program a process called linking must be performed linking is the process of attaching code from libraries that you did not write yourself to the program you wrote yourself. For example the statement #include<iostream.h> Actually is telling C++ linker to bring in the code of the library called iostream. This is basically a program that enables you to print on the screen by simply using one statement cout<<….There is a whole program behind the cout statementthat is found in the library iostream. Click Build then Build area.cpp to perform the linking process for the resulting program form the compiler To obtain the executable (machine language version of your program a process called linking must be performed linking is the process of attaching code from libraries that you did not write yourself to the program you wrote yourself. For example the statement #include<iostream.h> Actually is telling C++ linker to bring in the code of the library called iostream. This is basically a program that enables you to print on the screen by simply using one statement cout<<….There is a whole program behind the cout statementthat is found in the library iostream.

Click on Build, then Execute area.exe to execute the machine language program

The window labeled C:\TEMP\area\Debug\area.exe is te one inside of which the machine language version of your program is being executed version of your program is being executed The window labeled C:\TEMP\area\Debug\area.exe is te one inside of which the machine language version of your program is being executed version of your program is being executed