Download as pdf
Download as pdf
You are on page 1of 61
‘The C++ Programming Language — Reference Manual Bjarne Stroup AT&T Bell Laboratories Murray Hill, New Jersey 07974 ( ABSTRACT C++ is C extended with ciasses, inline functions, operator overloading, function name overloading, constant types, references, free store management, function argument checking, and a new function definition syntax. This manual wwas derived from the Unix System V C reference manual, and the general organi- zation and section numbering have been preserved whereever possible. The differ- ences between C++ and C ate summarized. Except for details like introduction of new keywords, C++ is a superset of C. An index and a table of contents are also provided. For a more readable presentation of most of the new features see Bjarne Stroustrup: “A C++ Tutorial’. ot Bjarne Stroustrup: "The C++ Programming Language - Reference Manual”. Both in this volume. CONTENTS oe Bp HEE HEGEL aye egg 6e: an ad pass wh hl Ho HAG a! anane 333593 sQRRRR828 Baaas 4.3, ‘Fundamental types 44° Derived types. $. OBJECTS AND LVALUES . 6. CONVERSIONS 8.5 Class declarations 4.2 Storage classes 8.6 Initialization 8.7 Type names 4.1 Scopes 8.2 ‘Type specifiers 83° Declarators 25 2a 62 6 6 6. 6. 6 7 7, 7. 7 7. 7 7. 7 1 7. 7 1 7. 1 1 2, LEXICAL CONVENTIONS . 3. SYNTAX NOTATION 4, WHAT'S IN A NAME? 1. INTRODUCTION 8. DECLARATIONS . Compound statement, or block 3 Conditional statement 9.4 While statement... 9.5 Dostatement . 9.6 For statement. . 9.7 Switch statement « ‘Typedet 8.10 Enumeration declarations. 8.9 Overloaded function names 88 92 93 8.11 Asm declaration . 9. STATEMENTS . 9.1 Expression statement 9.13, Null statement 9.15 Declaration statement 10. EXTERNAL DEFINITIONS 9.14 Delete statement « 30:1 Function definitions... 10.2 External data definitions. 11. SCOPERULES. . . . . 12. COMPILER CONTROL LINES 32.1 Token replacement 144 Explicit pointer conversions 15. CONSTANT EXPRESSIONS 14.1 Classes. 33, IMPLICIT DECLARATIONS 14. TYPES REVISITED . . . 162 Functions. 143 Arrays, pointers, and subscripting 16. PORTABILITY CONSIDERATIONS. . . . - 17, FREE STORE 19.2 Summary of incompatibilities . 18S Preprocessor 2. 5. st 19.3. Anachronisms 19, DIFFERENCES FROM C 18.4 External definitions . 19.1 Extensions. . I i !

You might also like