C + + originates from C, the original name is C with Classes, meaning the C language with class, however, with the continuous development and expansion of C + +, in many features has been far beyond C, even some C + + programmers in turn to see C code will feel unaccustomed.
C + + can be seen as a four-part component, namely:
(1) C. C + + is based on the syntax and code style, and this is the origin of C + + naming, on the basis of C + +. Interestingly, in the "C + + Primer" This book has a question, why C + + is called "C + +" instead of "++c" it? The reason is simple, C + + has a deep C, ++c may get D, symbolizing another language, and C + + returned to C, indicating that it is standing on the shoulder of the giant C.
(2) Object oriented. Object-oriented programming is a distinct part of C + +, which introduces the concept of classes and objects, provides a good abstraction for things, and in a class can not only define member variables like structs in C, but also provide quick and easy member functions. Instead of using a function pointer in a struct like C.
(3) template. C + + templates, the generic programming etiquettes, have templates that do not have to manually provide all types of overloaded versions, but are generated by the compiler itself, greatly reducing the verbosity of the code.
(4) STL. STL is a good C + + Template Library, which integrates a lot of practical library functions, such as String,vector,list,map (the only pity is that there is no hash-related library, but also pay attention to some of the interface inconsistencies, such as string use Index as a large number of interfaces, Other containers, such as vectors, use iterator as an interface.
Reading notes _effective c++_ clause I: treat C + + as a language federal