Reading notes _effective c++_ clause I: treat C + + as a language federal

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.