Common business-oriented Language
BASIC (beginner ' s all-purpose symbolic instruction Code)
1972 C
1983 C + +
1995 Java
Portability Performance
object-oriented function
Grammar
subset subset;
Scope of application sphere scope range of application
Compile explains the parse explain
Machine instruction Machine code instruction code operation;
interpreter compiler;
Parse compile;
The interpreter executes the action specified by the source code, which is slower than compiling the code, and the compiler generates the machine code that corresponds to the source code to execute the action specified by the source code.
Writing programs is usually faster than other languages,
Applications are performed on different computers, performing performance is not very important
Library
Standard code that can be used for any program.
Library:
The functionality provided in the C + + standard library is stored in the relevant header file;
#include <iostream>
#include function is to insert the contents of the <iostream> header file into the program source file in the location of the instruction, the program is completed before compiling;
return 0; Introduce the program, return control to the operating system, return other values to indicate whether the program executes successfully, usually 0 means the normal end, the universal Character set Universal Character set;
Reserved names for the C + + standard library
Universal Character Set Universal Character set
Extended character Set extended character set
namespace namespace;
Identified rule,element
\
namespace, the name of a namespace is similar to a surname, within a namespace, you can use its member name, outside the namespace, to combine entity namespace names, namespace entities, programs that contain different namespaces
The purpose of the namespace is to provide a mechanism to minimize the likelihood of conflicts due to duplicate names, and entities in the C + + standard library are
:: Range Interpretation operators
cout full name std:cout, namespace STD definition, all entities in the standard library are qualified with STD
The using directive represents the name of the namespace std that we want to specify in each reference to the entity element in the namespace Std
std::cout<<;
Allows namespace names to be used without the need for namespace names to qualify
Explicitly qualifying cout with a namespace name does not have to be clear
using namespace Std;
Using Std::cout
C + + Classics