Chapter 2 ( Introductions to C++ Programming, Input/Output, and Operators )
Comments
Ignored by compiler. Causes no actions to occur.
White space ( Blank lines, space characters and tab characters )
Makes programs easier to read. White-space characters outside of string literals are ignored by the compiler.
Statement Terminator (;)
Most C++ statements end iwth a semicolon.
Newline Escape Sequence ( \n )
Moves the cursor to the beginning of the next line on the screen.
Streams
Output and inputs in C++ are accomplished with streams of data.
Prompt
A message that directs the user to take a specific action.
String
A string in " Double Quotes" is sometimes referred to as a character string, message or string literal. White space-characters in strings are not ignored by the compiler.
Memory
A variable is a location in memory where a value can be stored for use by a program. Every variable stored in the computer's memory has a name, a value, a type and a size.
Variables
All variables must be declared before they can be used.
Single-line comments
Begin with ( // ). Insert comments to document your programs and improve their readability.
Preprocessing Directive
Begins with ( # ) and is a message to the C++ preprocessor. Preprocessing directives are processed before the program is compiled.
Return Function
C++ keyword that means to exit a function.
Main Function
C++ programs begin executing at main, even if main does not appear first in the program.
#include <iostream>
Tells the C++ preprocessor to include the contents of the input/output stream header, which contains information necessary to compile programs that output data to the screen or input data from the keyboard.
Body
The body of every function must be contained in braces ( { and } ).
std::cout
The output stream object normally connected to the screen is used to output data. Multiple data items can be output by concatenating stream insertion (<<) operators.
List Initialization
The variable's initial value is placed in braces ( { and } ) immediately following the variable's name.
Escape Sequence
When a backslash is encountered in a string of characters, the next character is combined with the backslash to form an escape sequence.