? 1.1 C + + Introduction ?
C++=c language + Object-oriented + generics,C + + Programming Method = Procedural language + Object-oriented language + generic programming
1.2 A Brief history of C + +
1. The procedural language first determines the calculations and the actions to be taken, and then uses the programming language to implement these operations.
2. structured programming restricts branching to a set of well-behaved structures (for loops,while loops,do and if else statements)
3. C language has structured programming and top-down design principles.
4. the idea of object-oriented programming is to design the data format corresponding to the nature of the problem. In C + + , a class is a specification that describes the new data format, which is a specific structure constructed from this specification. Typically, a class specifies what data can be used to represent an object and what operations are performed on that data.
5. C + + has programming patterns for object-oriented programming and generic programming. However , OOP emphasizes the data aspect of programming, while generic programming emphasizes being independent of a particular type.
6. C + + is Bjarne Stroustrup developed at Bell Labs in the year of the century , incorporating OOP(inspired by simula67 ) , generic programming, and traditional procedural methods.
? 1.3 Portability and standards ?
1. portability There are two obstacles: hardware, language differences
2. Ansi/iso is specifically responsible for the development of the C + + standard,c++98 is the first C + + standard.
? 1.4 Tips for creating programs ?
1. Unix can use CC command to compile program
2. The most common compiler for Linux is the GNU C + + compiler
3. Windows can be used with command-line compilers (in combination with Cygwin or MinGW ) and the Windows compiler
Compile compiling the current file , build and make Compile code for all source files, Build all recompile all source file code files, link Combine source code with library file, run or Execute Run the program, debug Execute the program in a stepping way.
4. The Macintosh Development Framework Xcode, not only integrates multiple languages of the IDE, but also comes with two command-line compilers (g++ and clang) that can be Run in UNIX mode.
5. when improving errors, first error should be corrected first. If you cannot find an error in the line that is identified as having errors, review the previous line.
C + + Primer Plus (i)--pre-knowledge