Programming in C++
Rules and Recommendations
Copyright (C) 1990-1992 by
Ellemtel Telecommunication Systems Laboratories
Box 1505
125 25 Alvsjo
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.
Original translation from Swedish by Joseph Supanich.
The layout of this document has been modifyed by Per
Cederqvist so that it is more readable on a 80-column
screen. I.e. paragraphs has been refilled.
Additional layout modifications by Gary Shea (shea@cs.ukans.edu)
and Mats Henricson (mats.henricson@eua.ericsson.se).
Conversion to HTML with links by Robert M. Adams (radams@khis.com).
The appearance of indicates a comment by R. M. Adams. The symbol is a link to that comment.
Table of Contents
-----------------
- Introduction
- Terminology
- General Recommendations
- Source Code in Files
- Structure of Code
- Naming Files
- Comments
- Include Files
- Assigning Names
- Style
- Classes
- Functions
- Compound Statements
- Flow Control Statements
- Pointers and References
- Miscellaneous
- Classes
- Considerations Regarding Access Rights
- Inline Functions
- Friends
- const Member Functions
- Constructors and Destructors
- Assignment Operators
- Operator Overloading
- Member Function Return Types
- Inheritance
- Class Templates
- Functions
- Function Arguments
- Function Overloading
- Formal Arguments
- Return Types and Values
- Inline Functions
- Temporary Objects
- General
- Constants
- Variables
- Pointers and References
- Type Conversions
- Flow Control Structures
- Expressions
- Memory Allocation
- Fault Handling
- Portable Code
- Data Abstraction
- Sizes of Types
- Type Conversions
- Data Representation
- Underflow/Overflow
- Order of Execution
- Temporary Objects
- Pointer Arithmetic
- References
- Summary of Rules
- Summary of Recommendations
- Summary of Portability Recommendations
- Appendix Form for Rule Change Request (not included in this hypertext)
Robert M. Adams' Home Page