Beruflich Dokumente
Kultur Dokumente
Comments
#include <iostream>
1. Comments
Written between /* and */ or following
a //.
4
5
int main()
8
9
return 0;
Outline
3. main
10 }
Welcome to C++!
<<
Stream insertion operator
Value to the right of the operator (right operand) inserted
into output stream (which is connected to the screen)
std::cout << Welcome to C++!\n;
Escape character
Indicates that a special character is to be output
2000 Prentice Hall, Inc. All rights reserved.
Description
\n
\t
\r
\a
\\
\"
#include <iostream>
1. Load <iostream>
4
5
int main()
2. main
9
10
return 0;
Outline
11 }
Welcome to C++!
Program Output
#include <iostream>
Outline
1. Load <iostream>
2. main
int main()
2.2 newline
2.3 Print "to"
8
9
return 0;
10 }
2.5 newline
2.6 Print "C++!"
Welcome
to
2.7 newline
C++!
2.4 newline
Program Output