Programming in C ++, rules and recommendations

Source: Internet
Author: User
Programming in C ++, rules and recommendations

By mats henricson and Erik nyquest.

Original translation from Swedish by Joseph supanich

Copyright 1990-1992 byellemtel telecommunication systems laboratories
Box 1, 1505
125 25älvsjö
Sweden
Tel: int + 46 8 727 30 00

Permission is granted to any individual or institution to use, copy, modify, and distribute this document, provided that this complete copyright and permission notice is maintained intact in all copies.

Ellemtel telecommunication systems laboratories makes no representations about the suitability of this document or the examples described herein for any purpose. It is provided 'as is 'without any expressed or implied warranty.

The original document is available in compressed postscript format for A4 and US letter paper sizes.

Table of contents
  • 1. Introduction
  • 2. Terminology
  • 3. General recommendations
  • 4. source code in files
    • 4.1. Structure of code
    • 4.2. Naming files
    • 4.3. Comments
    • 4.4. Include files
  • 5. Assigning names
  • 6. Style
    • 6.1. Classes
    • 6.2. Functions
    • 6.3. Compound statements
    • 6.4. Flow Control statements
    • 6.5. pointers and references
    • 6.6. Miscellaneous
  • 7. Classes
    • 7.1. Considerations regarding access rights
    • 7.2. inline functions
    • 7.3. Friends
    • 7.4.constMember Functions
    • 7.5. constructors and Destructors
    • 7.6. assignment operators
    • 7.7. Operator Overloading
    • 7.8. member function return types
    • 7.9. Inheritance
  • 8. Class templates
  • 9. Functions
    • 9.1. function arguments
    • 9.2. Function Overloading
    • 9.3. formal arguments
    • 9.4. Return types and values
    • 9.5. inline functions
    • 9.6. Temporary objects
    • 9.7. General
  • 10. Constants
  • 11. Variables
  • 12. pointers and references
  • 13. type conversions
  • 14. flow control structures
  • 15. Expressions
  • 16. Memory Allocation
  • 17. Fault Handling
  • 18. Portable code
    • 18.1. Data Processing action
    • 18.2. Sizes of Types
    • 18.3. type conversions
    • 18.4. Data Representation
    • 18.5. underflow/Overflow
    • 18.6. Order of execution
    • 18.7. Temporary objects
    • 18.8. pointer Arithmetic
  • 19. References
  • 20. Summary of rules
  • 21. Summary of recommendations
  • 22. Summary of portability recommendations

 

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.