C++ programming
STRUCTURE OF A C PROGRAMMING
-Creating -MECHANICS, Compiling and Running a C Program
C++ CHARACTERISTICS
-General-purpose language that is as efficient and portable as C -Compatible with C, therefore providing a smooth transition from C
Bjarne Stroustrup
-developed C++ at Bell Labs in 1983 -C++ is an extension of C.
int main ()
-initiates the declaration of a function -the function called when the program is run
<<
-insertion operator -indicates that what follows is inserted into std::cout.
Statement
-is an expression that can actually produce some effect. It is the meat of a program, specifying its actual behavior -are executed in the same order that they appear within a function's body.
C Programming Language
Programming Language for UNIX OS
/*...*/
block comment
Dennis Ritchie
created the C Programming Language in the early 1970's
block comment
discards everything between the /* characters and the first appearance of the */ characters, with the possibility of including multiple lines.
line comment
discards everything from where the pair of slash signs (//) are found up to the end of that same line.
Comments
do not affect the operation of the program; however, they provide an important tool to document directly within the source code what the program does and how it operates.
std::cout
identifies the standard character output device (usually, this is the computer screen)
{}
indicates the beginning of main's function definition and end
#include <iostream>
instructs the preprocessor to include a section of standard C++ code, known as header iostream, that allows to perform standard input and output operations
//
line comment
Using namespace std
make it easier to reference operations included in that namespace.
;
marks the end of a stetement
std::cout << "...";
statement output function