Ø The identifier cout (pronounced “C out”) is actually an object. Ø It is predefined in C++ to correspond to the standard output[r]
Trang 1LESSON 03
Trang 2Overview
of Previous Lesson(s)
2
Trang 3Over View
Ø IDE
Ø An IDE or interactive development environment is a software application that provides comprehensive facilities to computer programmers for software development
Ø An IDE normally consists of a source code editor, build
automation tools and a debugger
Trang 4Over View
Ø Microsoft Visual Studio is an integrated development
environment (IDE) from Microsoft Corporation
Ø It is used to develop console and graphical applications along with Windows Forms, Websites in both native code and with managed code
Ø It is supported by Microsoft Windows, Win Mobile, Win
CE, NET Framework
4
Trang 5Over View…
Ø C++
Ø Keywords Reserved words int, main, class, define
Ø Identifiers Programmers defined variables
Ø Operators Used to perform different types of operations on
data
Ø Punctuation ,5 ;
Trang 6Over View…
Ø C++
Ø Data Types When computer programs store data in variables,
each variable must be assigned a specific data type
Some common data types include integers, floating point numbers, characters, strings, and arrays.
Ø Steps performed by a program
Ø Take the input
Ø Process the data
Ø Produce the output
6
Trang 7Parts of Program
// sample C++ program Comment
#include <iostream> Pre processor directive
using namespace std; Which namespace to use
int main() Main function beginning
cout << "Hello, there!";
return 0;
Trang 8TODAY’S LESSON
8
Trang 9Cout Object
Ø The identifier cout (pronounced “C out”) is actually an object
Ø It is predefined in C++ to correspond to the standard output stream in IOSTREAM File
Ø The standard output stream normally flows to the screen
display—although it can be redirected to other output
devices
Ø << is called the insertion operator
Trang 10Cin Object
Ø The identifier cin (pronounced “C in”) is actually an object
Ø It is predefined in C++ to correspond to the standard input stream in IOSTREAM File
Ø This stream represents data coming from the keyboard
unless it is redirected
Ø << is also called the extraction operator
10