A set of commonly used functionality and data structures to build upon.
It’s somtimes called the c++ standard template library (stl).
It’s divided up into a number of separate files, and we make use of them by including them in any of out c++ programs.
Standard Library Organization
All functionality used from the std will be part of the std namespace.
namespace allow us to avoid name conflicts for commonly used names.
it can be imported into the global space with “using”:
usingstd::cout
we can convert typing std cout into just typing cout.
Using uiuc namespace
we have encapsulated the Cube class into the uiuc namespace.
add curly brace, and we’re going to do that inside of both header and the cpp file.
Quiz
A class can consist of multiple member data variables of different types, but each type must be specified when the class is defined.
Even if the functions are declared in the class and implemented in a separate .cpp file, they are still part of the class.
Namespaces allow different libraries to use the same label for a class or variable because they can each define a unique namespace to differentiate them when they are used together in a program.