Programming in C++, Rules and Recommendations
2888 ワード
Programming in C++, Rules and Recommendations
By Mats Henricson and Erik Nyquist.
Original translation from Swedish by Joseph Supanich
Copyright © 1990-1992 by Ellemtel Telecommunication Systems Laboratories
Box 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. 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 Abstraction 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
By Mats Henricson and Erik Nyquist.
Original translation from Swedish by Joseph Supanich
Copyright © 1990-1992 by Ellemtel Telecommunication Systems Laboratories
Box 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
const
Member Functions