While there are some similarities between the structure of C and C++ programs, there are also some crucial differences.
-
C++ relies on an external standard library to provide assertion testing. The information the program needs to use this library
resides in the library file assert.h. The assert macro tests a condition for correctness and terminates the
program if the test fails.
-
A C++ program consists of declarations that may be in different files. Each function is on the external, or global, level
and may not be declared in a nested manner. The files act as modules and may be separately compiled. We will be discussing
scope and storage classes in greater detail later in this course.