Book description
To-the-point, authoritative, no-nonsense solutions have always been a trademark of O'Reilly books. The In a Nutshell books have earned a solid reputation in the field as the well-thumbed references that sit beside the knowledgeable developer's keyboard. C++ in a Nutshell lives up to the In a Nutshell promise. C++ in a Nutshell is a lean, focused reference that offers practical examples for the most important, most often used, aspects of C++.C++ in a Nutshell packs an enormous amount of information on C++ (and the many libraries used with it) in an indispensable quick reference for those who live in a deadline-driven world and need the facts but not the frills.The book's language reference is organized first by topic, followed by an alphabetical reference to the language's keywords, complete with syntax summaries and pointers to the topic references. The library reference is organized by header file, and each library chapter and class declaration presents the classes and types in alphabetical order, for easy lookup. Cross-references link related methods, classes, and other key features. This is an ideal resource for students as well as professional programmers.When you're programming, you need answers to questions about language syntax or parameters required by library routines quickly. What, for example, is the C++ syntax to define an alias for a namespace? Just how do you create and use an iterator to work with the contents of a standard library container? C++ in a Nutshell is a concise desktop reference that answers these questions, putting the full power of this flexible, adaptable (but somewhat difficult to master) language at every C++ programmer's fingertips.
Publisher resources
Table of contents
- A Note Regarding Supplemental Files
- Preface
- 1. Language Basics
- 2. Declarations
-
3. Expressions
- 3.1. Lvalues and Rvalues
- 3.2. Type Conversions
- 3.3. Constant Expressions
- 3.4. Expression Evaluation
-
3.5. Expression Rules
- 3.5.1. Primary Expressions
- 3.5.2. Postfix Expressions
- 3.5.3. Unary Expressions
- 3.5.4. Cast Expressions
- 3.5.5. Pointer-to-Member Expressions
- 3.5.6. Multiplicative Expressions
- 3.5.7. Additive Expressions
- 3.5.8. Shift Expressions
- 3.5.9. Relational Expressions
- 3.5.10. Equality Expressions
- 3.5.11. Bitwise And Expressions
- 3.5.12. Bitwise Exclusive Or Expressions
- 3.5.13. Bitwise Inclusive Or Expressions
- 3.5.14. Logical And Expressions
- 3.5.15. Logical Or Expressions
- 3.5.16. Conditional Expressions
- 3.5.17. Assignment Expressions
- 3.5.18. Comma Expressions
- 4. Statements
-
5. Functions
- 5.1. Function Declarations
- 5.2. Function Definitions
- 5.3. Function Overloading
- 5.4. Operator Overloading
- 5.5. The main Function
- 6. Classes
- 7. Templates
- 8. Standard Library
- 9. Input and Output
- 10. Containers, Iterators, and Algorithms
-
11. Preprocessor Reference
- # operator and directive — Stringify operator and null directive
- ## operator — Concatenation operator
- #define directive — Defines a macro
- defined operator — Tests whether a macro is defined
- #elif directive — Else-if for conditional compilation
- #else directive — Else for conditional compilation
- #endif directive — Ends conditional compilation
- #error directive — Issues an error message
- #if directive — Tests a condition
- #ifdef directive — Tests whether a macro is defined
- #ifndef directive — Tests whether a macro is undefined
- #include directive — Includes another source file
- #line directive — Changes the line number in error messages
- #pragma directive — Controls the compiler
- #undef directive — Undefines a macro
-
12. Language Reference
- and operator — Logical and operator
- and_eq operator — Bitwise and assignment operator
- asm definition — Inline assembler definition
- auto storage class — Automatic variable specifier
- bitand operator — Bitwise and operator
- bitor operator — Bitwise inclusive or operator
- bool type — Boolean (logical) type specifier
- break statement — Exits from a loop or switch statement
- case keyword — Case label for switch statement
- catch keyword — Exception handler in try statement
- char type — Character type specifier
- class keyword — Declares a class or template parameter, or elaborates a type name
- compl operator — Bitwise complement operator
- const qualifier — Marks objects and functions as constant
- const_cast operator — Cast to modify qualifiers
- continue statement — Reiterates a loop statement
- declaration — Function, namespace, object, type, template declaration
- declarator — Provides information about a single identifier in a declaration
- default keyword — Catch-all label in switch statement
- delete operator — Deletes a dynamic object or array of objects
- do statement — Test-at-bottom loop statement
- double type — Double-precision, floating-point type specifier
- dynamic_cast operator — Polymorphic cast of class type objects
- else keyword — Else part of if statement
- enum keyword — Declares enumerated type or elaborates an enumerated type name
- explicit specifier — Explicit constructor specifier
- export specifier — Exported template specifier
- expression — Any expression
- extern storage class — External storage class specifier
- false literal — Boolean false literal
- float type — Single-precision, floating-point type specifier
- for statement — For loop statement
- friend specifier — Grants access to private class members
- function — Function definition
- goto statement — Transfers execution to a labeled statement
- identifier — Name of an entity
- if statement — Selection statement
- inline specifier — Inline function specifier
- int type — Integer type specifier
- long type — Long type specifier
- mutable specifier — Mutable data member specifier
- namespace keyword — Declares namespace
- new operator — Allocates a dynamic object or array of objects
- not operator — Logical negation operator
- not_eq operator — Inequality operator
- operator keyword — Function call syntax for operators
- or operator — Logical or operator
- or_eq operator — Bitwise or assignment operator
- private access specifier — Restricts member access to the class
- protected access specifier — Restricts member access to the class and derived classes
- public access specifier — No restrictions on member access
- register storage class — Register storage class specifier
- reinterpret_cast operator — Cast for unsafe pointer conversions
- return statement — Returns from a function
- short type — Short integer type specifier
- signed specifier — Signed integer type specifier
- sizeof operator — Size of type operator
- statement — Statement syntax
- static storage class — Static storage class specifier
- static_cast operator — Explicit cast operator
- struct keyword — Declares class with public members
- switch statement — Multibranch selection statement
- template keyword — Declares a template, specialization, or instantiation
- this keyword — Object pointer in member function
- throw operator — Throws an exception
- true literal — Logical true literal
- try statement — Handles exceptions in statements
- type — Type specifiers
- typedef keyword — Declares a type synonym
- typeid operator — Runtime type identification operator
- typename keyword — Introduces a type name
- unsigned specifier — Unsigned integer type specifier
- union keyword — Declares a union
- using keyword — Looks up names in alternate classes or namespaces
- virtual specifier — Polymorphic function specifier or shared base class
- void keyword — Absence of type or function arguments
- volatile qualifier — Volatile qualifier
- wchar_t type — Wide-character type specifier
- while statement — Test-at-top unbounded loop statement
- xor operator — Bitwise exclusive or operator
- xor_eq operator — Bitwise exclusive or assignment operator
-
13. Library Reference
- 13.1. <algorithm>
- 13.2. <bitset>
- 13.3. <cassert>
- 13.4. <cctype>
- 13.5. <cerrno>
- 13.6. <cfloat>
- 13.7. <ciso646>
- 13.8. <climits>
- 13.9. <clocale>
- 13.10. <cmath>
- 13.11. <complex>
- 13.12. <csetjmp>
- 13.13. <csignal>
- 13.14. <cstdarg>
- 13.15. <cstddef>
- 13.16. <cstdio>
- 13.17. <cstdlib>
- 13.18. <cstring>
- 13.19. <ctime>
- 13.20. <cwchar>
- 13.21. <cwctype>
- 13.22. <deque>
- 13.23. <exception>
- 13.24. <fstream>
- 13.25. <functional>
- 13.26. <iomanip>
- 13.27. <ios>
- 13.28. <iosfwd>
- 13.29. <iostream>
- 13.30. <istream>
- 13.31. <iterator>
- 13.32. <limits>
- 13.33. <list>
- 13.34. <locale>
- 13.35. <map>
- 13.36. <memory>
- 13.37. <new>
- 13.38. <numeric>
- 13.39. <ostream>
- 13.40. <queue>
- 13.41. <set>
- 13.42. <sstream>
- 13.43. <stack>
- 13.44. <stdexcept>
- 13.45. <streambuf>
- 13.46. <string>
- 13.47. <strstream>
- 13.48. <typeinfo>
- 13.49. <utility>
- 13.50. <valarray>
- 13.51. <vector>
- A. Compiler Extensions
- B. Projects
- Glossary
- About the Author
- Colophon
- Copyright
Product information
- Title: C++ In a Nutshell
- Author(s):
- Release date: May 2003
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596002985
You might also like
book
C++ Crash Course
Upgrade your Code with C++ C++ is one of the most widely used languages for real-world …
book
C++ Software Design
Good software design is essential for the success of your project, but designing software is hard …
book
Modern C++ Programming with Test-Driven Development
If you program in C++ you've been neglected. Test-driven development (TDD) is a modern software development …
book
Advanced C++
Become an expert at C++ by learning all the key C++ concepts and working through interesting …