C + + Primer Plus version 6th
Source Code---Compiler---target code---Connector (startup code-Library code)---executable code
Source code extension: C cc cxx C CPP C + +
Compile and Link: Unix CC **.c------"**.O-----" a.out
Linux g++ **.cxx need to link the library when the command: g++ **.cxx-lg++; compilation of multiple Files g++ 1.cxx 2.cxx If you modify 1.cxx, you need to compile the command
g++ 1.cxx 2.o re-link the recompiled 1.o with 2.O.
Refer to the command Manual of the man help compiler in Linux or Unix
When the IDE finishes executing the program, close the window immediately after the program source code, you can add
Cin.get (); \ \ Join status Read Next keystroke wait until enter key is pressed
Cin.get ();
return 0;
2nd Chapter
1. Case-sensitive
2. #include <iostream> added preprocessed files
using namespace Std;
cout<< Endl; Start a new row
3. Add Cin.get () before return; Consistent open window does not close
4. Preprocessor compilation directive # include
5. Compile instruction using namespace
6. function Head C + + use int mian (void) This usage void indicates that no arguments are accepted
7. Comments//single line multiline with/* */
8. precompilation pre-compile the command after # for example iostream to compile the contents of Ioistream after replacing # with the writing of large code files into a compound file.
9. Above iostream if you need to have a. h suffix in C + + in C + + if you use the old header file in C, you can still use the. h extension But some files are removed by the. h extension and preceded by a prefix c for the file name to represent the header file library from the C language. For example, using MATH.H in C + + for Cmath This change is useful for containing namespaces.
10.
C + + Primer Plus version 6th