C++ - Basic Concepts
cout is used in combination with the insertion operator. Write the insertion operator as
<< to insert the data that comes after it into the stream that comes before.
What was C++ derived from?
C++ was derived from C, and is largely based on it. It is a General purpose programming language.
A block
is a set of logically connected statements, surrounded by opening and closing curly braces.
In our code, the line using namespace std;
tells the compiler to use the std (standard) namespace.
In C++, the semicolon is used
terminate a statement. Each statement must end with a semicolon. It indicates the end of one logical expression.
Curly brackets { } indicate
the beginning and end of a function, which can also be called the function's body. The information inside the brackets indicates what the function does when executed.
In most program environments, the standard default output destination is the screen. In C++, cout is
the stream object used to access it.
In C++, streams are used
to perform input and output operations.