Reading Notes: C ++ programming specifications-101 rules, guidelines and best practices

Source: Internet
Author: User

Article 21 one entity should have only one compact responsibility

 

9th adjustment to avoid immature degradation

 

14th errors during compilation and connection, and do not run errors

 

17th avoid magic number

 

Article 21 The standard form of preferentially using Arithmetic Operators and value assignment operators

 

Article 14 The standard form of priority to use ++ and. Prefix format

 

29th avoid providing implicit Conversions

 

Article 21 prioritize the compilation of non-member non-friend Functions

 

Article 21 If special new is provided, all standard forms should be provided (common, local and non-Throw)

 

49th avoid calling virtual functions in constructor or destructor

Article 21 set the basic destructor as public and virtual, or protected and non-virtual

 

53rd explicitly enable or disable Replication

 

61st do not define entities with links in header files

 

62nd rational combinations of static and dynamic Polymorphism

 

Article 3 do not accidentally write differentCode

 

73rd items are throttled by values and captured by common references

 

Article 21 use accepted practices to truly compress capacity and truly Delete Elements

 

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.