You are on page 1of 1

scope: region of a program where names can be used.

-determines the lifetime of a name that doesn’t denote an object of static extent.
-determines visibility of name, when class constructors/destructors are called, and when
variables local to the scope are initialized.

C++ prgrams usually in free form (spaces required only when they keep adjacent symbols from
running together.)
- 3 entities are not free form:
a.) string literals - characters in double quotes; may not span lines.
b.) #include name - must appear on a line by themselves (except for
comments)
c.) //comments
i.) but /* */ comments are free form.

types - define data structures and operations on those data structures.


A.) C++ has two kinds of types:
1.) those built into the core language (i.e. int)
2.) those defined outside core language (i.e. std::ostream)

namespaces - mechanism for grouping related names (i.e. std)

string literals - begin and end w/ double quotes (“); each string literal must appear entirely on
one line of program.
A.) Some special \ characters:
1.) \n = newline
2.) \t = tab
3.) \b = backspace
4.) \” = treats this symbols are part of the string rather than as the string
terminator.
5.) \’ = same meaning as ‘ in string literals,
6.) \\ = includes a \ in the string.

You might also like