Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
2 views

introduction to Visual Cpp

Uploaded by

ethioawashmedia
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

introduction to Visual Cpp

Uploaded by

ethioawashmedia
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Debre Markos Poly Technic college

Department of information Technology


Introduction to Visual C++
Visual C++ and C++ are two entirely different things. They are related, though.
C++ is a high-level programming language that a compiler translates into machine code a computer can
understand and execute.

Visual C++ is a tool created by Microsoft to make writing, compiling and debugging C++ source code
easier. Visual C++ is an Integrated Development Environment (IDE).

Starting Your First Program


If this is the first time Visual Studio being used, you have to choose your Select Visual C++ Development
Settings, then click on Start Visual Studio. Note: If you want to choose another environment later, to
to the menu and click Tools -> Import and Export ->Reset all Settings ->Next, then you can pick either
save current settings or overwrite current settings.

The next thing you will see is the Start Page.

To get started on your first program, you must create a "project" that will keep track of all the parts of
your program, including the C++ source code, the header files, etc. Therefore, click the "Create Project"
link. A "New Project" dialogue box similar to the one below will appear.

1
Introduction to Visual C++ Trainer Name:- Bantegizia.Z
Debre Markos Poly Technic college
Department of information Technology

Follow these steps:


 For a "Name:", type a project name ("hello")
 "Location:", set it to your Desktop, or to your Documents\Visual Studio 2013\Projects
 Note: you should not work on VC++ projects over the campus network
 Click on "OK"
The "Win32 Application Wizard" will appear. As demonstrated below, click
on Application Settings, uncheck both Precompiled Header and Security
Development Lifecycle (SDL) checks, then select Empty Project.

2
Introduction to Visual C++ Trainer Name:- Bantegizia.Z
Debre Markos Poly Technic college
Department of information Technology

After this, click on Finish. You will notice that it doesn't appear like anything has
changed. However, if you look at the Solution Explorer on the right-hand side you
will see "Solution 'hello' (1 project)".

You want to add C++ source code to this project.

 Click on your project in the Solution Explorer


 Select Project | Add New Item... from the main menu
 Select C++ File (.cpp)
 Type in the file name: "hello.cpp" in the Name: box.
 Click on "Add".

#include <iostream>
using namespace std;
3
Introduction to Visual C++ Trainer Name:- Bantegizia.Z
Debre Markos Poly Technic college
Department of information Technology

int main()
{
char name[50];
cout << "Please enter your name:" << endl;

cin >> name;


cout << "Hello, " << name << endl;
return 0;
}

Lab Project

OOP Using Visual C++

1. variable
A. Local variable
B. Global Variable
2. Operators
C. Arithmetic operator
D. Relational Operators
E. Logical/Boolean operator:
F. Assignment Operators
3. Sequence structure
A. Break statement
B. Switch statement
C. goto statement
D. continue statement
4. Selection structure
A. If ... else statement
B. Switch statement
5. Loops/ Repetition/ Iteration
A. While Loop
B. Do …While loop
C. For loop:
6. Increment and decrement
A. Post increment operator
B. Pre increment operator
C. Post decrement operator
D. Pre decrement operator

4
Introduction to Visual C++ Trainer Name:- Bantegizia.Z
Debre Markos Poly Technic college
Department of information Technology
7. Using arrays and arrays of objects
8. Methods and Namespace
9. Class
Derived classes using
A. Single Inheritance
B. Multilevel Inheritance
C. Multiple Inheritance
D. Multiple Inheritances
E. Hybrid Inheritance
10. Polymorphism
A. Compile-time Polymorphism
1. A. Function Overloading
2. B. Operator Overloading
B. Runtime Polymorphism
1. A. Function Overriding
2. B. Virtual Function

5
Introduction to Visual C++ Trainer Name:- Bantegizia.Z

You might also like