Log In
Or create an account -> 
Imperial Library
  • Home
  • About
  • News
  • Upload
  • Forum
  • Help
  • Login/SignUp

Index
C++ In a Nutshell
Preface
Structure of This Book About the Examples Conventions Used in This Book For More Information Comments and Questions Acknowledgments
1. Language Basics
1.1. Compilation Steps 1.2. Tokens
1.2.1. Identifiers 1.2.2. Keywords 1.2.3. Literals
1.2.3.1. Integer literals 1.2.3.2. Floating-point literals 1.2.3.3. Boolean literals 1.2.3.4. Character literals 1.2.3.5. String literals
1.2.4. Symbols
1.3. Comments 1.4. Character Sets 1.5. Alternative Tokens 1.6. Trigraphs
2. Declarations
2.1. Declarations and Definitions
2.1.1. Definitions 2.1.2. Ambiguity
2.2. Scope 2.3. Name Lookup
2.3.1. Qualified Name Lookup 2.3.2. Unqualified Name Lookup 2.3.3. Argument-Dependent Name Lookup
2.4. Linkage
2.4.1. Scope Linkage 2.4.2. Language Linkage
2.5. Type Declarations
2.5.1. Fundamental Types 2.5.2. Enumerated Types 2.5.3. POD Types 2.5.4. typedef Declarations 2.5.5. Elaborated Type Specifier
2.6. Object Declarations
2.6.1. Specifiers
2.6.1.1. Storage class specifiers 2.6.1.2. const and volatile qualifiers 2.6.1.3. Type specifiers 2.6.1.4. Using specifiers
2.6.2. Declarators
2.6.2.1. Arrays 2.6.2.2. Pointers 2.6.2.3. Function pointers 2.6.2.4. Member pointers 2.6.2.5. References
2.6.3. Initializers
2.6.3.1. Function-like initializers 2.6.3.2. Assignment-like initializers 2.6.3.3. Initializing arrays 2.6.3.4. Initializing scalars
2.6.4. Object Lifetime
2.7. Namespaces
2.7.1. Namespace Definitions 2.7.2. Namespace Aliases 2.7.3. using Declarations 2.7.4. using Directives 2.7.5. How to Use Namespaces
3. Expressions
3.1. Lvalues and Rvalues 3.2. Type Conversions
3.2.1. Arithmetic Types 3.2.2. Type Promotion 3.2.3. Arithmetic Type Conversions 3.2.4. Implicit Numeric Conversions 3.2.5. Lvalue Conversions 3.2.6. Conversion to bool 3.2.7. Type Casts
3.3. Constant Expressions
3.3.1. Integral Constant Expressions 3.3.2. Null Pointers
3.4. Expression Evaluation
3.4.1. Sequence Points 3.4.2. Order of Evaluation 3.4.3. Short-Circuit 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
4.1. Expression Statements 4.2. Declarations
4.2.1. Declaration Statements 4.2.2. Condition Declarations
4.3. Compound Statements 4.4. Selections
4.4.1. if Statements 4.4.2. switch Statements
4.5. Loops
4.5.1. while Statements 4.5.2. for Statements 4.5.3. do Statements
4.6. Control Statements 4.7. Handling Exceptions
5. Functions
5.1. Function Declarations
5.1.1. Return Type 5.1.2. Parameters 5.1.3. Default Arguments 5.1.4. Variable Number of Arguments 5.1.5. cv-qualifiers 5.1.6. Exception Specifications
5.2. Function Definitions
5.2.1. Declarations and Definitions 5.2.2. Function Types and Signatures 5.2.3. Function Bodies and try Blocks
5.3. Function Overloading
5.3.1. Declaring Overloaded Functions 5.3.2. Calling Overloaded Functions 5.3.3. Candidate Functions
5.3.3.1. Qualified member function call 5.3.3.2. Unqualified function call 5.3.3.3. Operator 5.3.3.4. Function-like initialization 5.3.3.5. Assignment-like initialization 5.3.3.6. Conversion initialization 5.3.3.7. Reference bound to conversion
5.3.4. Addresses of Overloaded Functions 5.3.5. Best Overloaded Function
5.3.5.1. Pruning the candidate list 5.3.5.2. Choosing the best function 5.3.5.3. Argument conversion sequences
5.4. Operator Overloading
5.4.1. Short-Circuit Operators 5.4.2. Comma Operator 5.4.3. Increment and Decrement 5.4.4. Member Reference 5.4.5. Function Call 5.4.6. operator new and operator delete 5.4.7. Type Conversion
5.5. The main Function
6. Classes
6.1. Class Definitions
6.1.1. Plain Old Data 6.1.2. Trivial Classes 6.1.3. Unions 6.1.4. Local Classes
6.2. Data Members
6.2.1. Data Layout 6.2.2. Mutable Data Members 6.2.3. Bit-Fields 6.2.4. Static Data Members
6.3. Member Functions
6.3.1. Pointers-to-Members 6.3.2. this Pointer 6.3.3. Static Member Functions 6.3.4. Constructors
6.3.4.1. Declaring constructors 6.3.4.2. Special constructors 6.3.4.3. Calling constructors 6.3.4.4. Throwing exceptions during construction
6.3.5. Destructors 6.3.6. Implicit Member Functions
6.3.6.1. Implicit default constructor 6.3.6.2. Implicit copy constructor 6.3.6.3. Implicit copy assignment operator 6.3.6.4. Implicit destructor
6.4. Inheritance
6.4.1. Virtual Functions 6.4.2. Covariant Return Types 6.4.3. Pure Virtual Functions 6.4.4. Abstract Classes 6.4.5. Multiple Inheritance 6.4.6. Virtual Inheritance 6.4.7. Polymorphic Constructors and Destructors
6.5. Access Specifiers 6.6. Friends 6.7. Nested Types
7. Templates
7.1. Overview of Templates 7.2. Template Declarations 7.3. Function Templates
7.3.1. Function Signatures 7.3.2. Deducing Argument Types 7.3.3. Overloading 7.3.4. Operators
7.4. Class Templates
7.4.1. Member Templates 7.4.2. Friends
7.5. Specialization 7.6. Partial Specialization 7.7. Instantiation 7.8. Name Lookup
7.8.1. Dependent Names 7.8.2. Resolving Names 7.8.3. Hiding Names 7.8.4. Using Type Names
7.9. Tricks with Templates 7.10. Compiling Templates
8. Standard Library
8.1. Overview of the Standard Library 8.2. C Library Wrappers 8.3. Wide and Multibyte Characters
8.3.1. Wide Characters 8.3.2. Multibyte Characters 8.3.3. Shift State
8.4. Traits and Policies
8.4.1. Character Traits 8.4.2. Iterator Traits 8.4.3. Custom Traits
8.5. Allocators
8.5.1. Using Allocators 8.5.2. Custom Allocators
8.6. Numerics
9. Input and Output
9.1. Introduction to I/O Streams
9.1.1. Custom I/O Operators 9.1.2. The C Standard I/O Library 9.1.3. C++ I/O Headers
9.2. Text I/O
9.2.1. Formatted Input 9.2.2. Formatted Output
9.3. Binary I/O 9.4. Stream Buffers 9.5. Manipulators
9.5.1. Standard Manipulators 9.5.2. Custom Manipulators
9.6. Errors and Exceptions
10. Containers, Iterators, and Algorithms
10.1. Containers
10.1.1. Standard Containers 10.1.2. Container Adapters 10.1.3. Pseudo-Containers 10.1.4. Container Requirements
10.1.4.1. Member types 10.1.4.2. Member functions 10.1.4.3. Exceptions
10.1.5. Using Containers
10.1.5.1. Value type requirements 10.1.5.2. Inserting values 10.1.5.3. Erasing values 10.1.5.4. Searching
10.2. Iterators
10.2.1. Iterator Categories 10.2.2. Iterator Safety 10.2.3. Special Iterators 10.2.4. Custom Iterators 10.2.5. const_iterators 10.2.6. Reverse Iterators
10.3. Algorithms
10.3.1. How Algorithms Work 10.3.2. Standard Algorithms
10.3.2.1. Nonmodifying operations 10.3.2.2. Comparison 10.3.2.3. Searching 10.3.2.4. Binary search 10.3.2.5. Modifying sequence operations 10.3.2.6. Sorting 10.3.2.7. Merging 10.3.2.8. Set operations 10.3.2.9. Heap operations 10.3.2.10. Permutations
10.3.3. Custom Algorithms
11. Preprocessor Reference
# operator and directive ## operator #define directive defined operator #elif directive #else directive #endif directive #error directive #if directive #ifdef directive #ifndef directive #include directive #line directive #pragma directive #undef directive
12. Language Reference
and operator and_eq operator asm definition auto storage class bitand operator bitor operator bool type break statement case keyword catch keyword char type class keyword compl operator const qualifier const_cast operator continue statement declaration declarator default keyword delete operator do statement double type dynamic_cast operator else keyword enum keyword explicit specifier export specifier expression extern storage class false literal float type for statement friend specifier function goto statement identifier if statement inline specifier int type long type mutable specifier namespace keyword new operator not operator not_eq operator operator keyword or operator or_eq operator private access specifier protected access specifier public access specifier register storage class reinterpret_cast operator return statement short type signed specifier sizeof operator statement static storage class static_cast operator struct keyword switch statement template keyword this keyword throw operator true literal try statement type typedef keyword typeid operator typename keyword unsigned specifier union keyword using keyword virtual specifier void keyword volatile qualifier wchar_t type while statement xor operator xor_eq operator
13. Library Reference
13.1. <algorithm>
adjacent_find function template binary_search function template copy function template copy_backward function template count function template count_if function template equal function template equal_range function template fill function template fill_n function template find function template find_end function template find_first_of function template find_if function template for_each function template generate function template generate_n function template includes function template inplace_merge function template iter_swap function template lexicographical_compare function template lower_bound function template make_heap function template max function template max_element function template merge function template min function template min_element function template mismatch function template next_permutation function template nth_element function template partial_sort function template partial_sort_copy function template partition function template pop_heap function template prev_permutation function template push_heap function template random_shuffle function template remove function template remove_copy function template remove_copy_if function template remove_if function template replace function template replace_copy function template replace_copy_if function template replace_if function template reverse function template reverse_copy function template rotate function template rotate_copy function template search function template search_n function template set_difference function template set_intersection function template set_symmetric_difference function template set_union function template sort function template sort_heap function template stable_partition function template stable_sort function template swap function template swap_ranges function template transform function template unique function template unique_copy function template upper_bound function template
13.2. <bitset>
bitset class template bitset::reference class operator& function template operator| function template operator^ function template operator >>function template operator<< function template
13.3. <cassert>
assert macro NDEBUG macro
13.4. <cctype>
isalnum function isalpha function iscntrl function isdigit function isgraph function islower function isprint function ispunct function isspace function isupper function isxdigit function tolower function toupper function
13.5. <cerrno>
EDOM macro EILSEQ macro ERANGE macro errno macro
13.6. <cfloat>
DBL_DIG macro DBL_EPSILON macro DBL_MANT_DIG macro DBL_MAX macro DBL_MAX_10_EXP macro DBL_MAX_EXP macro DBL_MIN macro DBL_MIN_10_EXP macro DBL_MIN_EXP macro FLT_DIG macro FLT_EPSILON macro FLT_MANT_DIG macro FLT_MAX macro FLT_MAX_10_EXP macro FLT_MAX_EXP macro FLT_MIN macro FLT_MIN_10_EXP macro FLT_MIN_EXP macro FLT_RADIX macro FLT_ROUNDS macro LDBL_DIG macro LDBL_EPSILON macro LDBL_MANT_DIG macro LDBL_MAX macro LDBL_MAX_10_EXP macro LDBL_MAX_EXP macro LDBL_MIN macro LDBL_MIN_10_EXP macro LDBL_MIN_EXP macro
13.7. <ciso646> 13.8. <climits>
CHAR_BIT macro CHAR_MAX macro CHAR_MIN macro INT_MAX macro INT_MIN macro LONG_MAX macro LONG_MIN macro MB_LEN_MAX macro SCHAR_MAX macro SCHAR_MIN macro SHRT_MAX macro SHRT_MIN macro UCHAR_MAX macro UINT_MAX macro ULONG_MAX macro USHRT_MAX macro
13.9. <clocale>
LC_ALL macro LC_COLLATE macro LC_CTYPE macro LC_MONETARY macro LC_NUMERIC macro LC_TIME macro lconv structure localeconv function NULL macro setlocale function
13.10. <cmath>
abs function acos function asin function atan function atan2 function ceil function cos function cosh function exp function fabs function floor function fmod function frexp function HUGE_VAL macro ldexp function log function log10 function modf function pow function sin function sinh function sqrt function tan function tanh function
13.11. <complex>
abs function template arg function template complex class template complex<double> template specialization complex<float> template specialization complex<long double> template specialization conj function template cos function template cosh function template exp function template imag function template log function template log10 function template norm function template operator+ function template operator- function template operator* function template operator/ function template operator== function template operator!= function template operator<< function template operator>> function template polar function template pow function template real function template sin function template sinh function template sqrt function template tan function template tanh function template
13.12. <csetjmp>
jmp_buf type longjmp function setjmp function
13.13. <csignal>
raise function SIG_DFL macro SIG_ERR macro SIG_IGN macro SIGABRT macro SIGFPE macro SIGILL macro SIGINT macro SIGSEGV macro SIGTERM macro sig_atomic_t type signal function
13.14. <cstdarg>
va_arg macro va_end macro va_list type va_start macro
13.15. <cstddef>
NULL macro offsetof macro ptrdiff_t type size_t type
13.16. <cstdio>
_IOFBF macro _IOLBF macro _IONBF macro BUFSIZ macro clearerr function EOF macro fclose function feof function ferror function fgetc function fgetpos function fgets function FILE type FILENAME_MAX macro fopen function FOPEN_MAX macro fpos_t type fprintf function fputc function fputs function fread function freopen function fscanf function fseek function fsetpos function ftell function fwrite function getc macro getchar macro gets function L_tmpnam macro NULL macro perror function printf function putc macro putchar macro puts function remove function rename function rewind function SEEK_CUR macro SEEK_END macro SEEK_SET macro setbuf function setvbuf function size_t type sprintf function sscanf function stderr macro stdin macro stdout macro TMP_MAX macro tmpfile function tmpnam function ungetc function vfprintf function vprintf function vsprintf function
13.17. <cstdlib>
abort function abs function atexit function atof function atoi function atol function bsearch function calloc function div function div_t type exit function EXIT_FAILURE macro EXIT_SUCCESS macro free function getenv function labs function ldiv function ldiv_t type malloc function MB_CUR_MAX function mblen function mbstowcs function mbtowc function NULL macro qsort function rand function RAND_MAX macro realloc function size_t type srand function strtod function strtol function strtoul function system function wctomb function wcstombs function
13.18. <cstring>
memchr function memcmp function memcpy function memmove function memset function NULL macro size_t type strcat function strchr function strcmp function strcoll function strcpy function strcspn function strerror function strlen function strncat function strncmp function strncpy function strpbrk function strrchr function strspn function strstr function strtok function strxfrm function
13.19. <ctime>
asctime function clock function clock_t type CLOCKS_PER_SEC macro ctime function difftime function gmtime function localtime function mktime function NULL macro size_t type strftime function time function time_t type tm struct
13.20. <cwchar>
btowc function fgetwc function fgetws function fputwc function fputws function fwide function fwprintf function fwscanf function getwc macro getwchar macro mbrlen function mbrtowc function mbsinit function mbsrtowcs function mbstate_t type NULL macro putwc macro putwchar macro size_t type swprintf function swscanf function tm struct ungetwc function vfwprintf function vswprintf function vwprintf function WCHAR_MAX macro WCHAR_MIN macro wcrtomb function wcscat function wcschr function wcscmp function wcscoll function wcscpy function wcscspn function wcsftime function wcslen function wcsncat function wcsncmp function wcsncpy function wcspbrk function wcsrchr function wcsrtombs function wcsspn function wcsstr function wcstod function wcstok function wcstol function wcstoul function wcsxfrm function wctob function WEOF macro wint_t type wmemchr function wmemcmp function wmemcpy function wmemmove function wmemset function wprintf function wscanf function
13.21. <cwctype>
iswalnum function iswalpha function iswcntrl function iswctype function iswdigit function iswgraph function iswlower function iswprint function iswpunct function iswspace function iswupper function iswxdigit function towctrans function towlower function towupper function wctrans function wctrans_t type wctype function wctype_t type WEOF macro wint_t type
13.22. <deque>
deque class template operator== function template operator!= function template operator< function template operator<= function template operator> function template operator>= function template swap function template specialization
13.23. <exception>
bad_exception class exception class set_terminate function set_unexpected function terminate function uncaught_exception function unexpected function
13.24. <fstream>
basic_filebuf class template basic_fstream class template basic_ifstream class template basic_ofstream class template filebuf class fstream class ifstream class ofstream class wfilebuf class wfstream class wifstream class wofstream class
13.25. <functional>
binary_function class template binary_negate class template bind1st function template bind2nd function template binder1st class template binder2nd class template const_mem_fun_ref_t class template const_mem_fun_t class template const_mem_fun1_ref_t class template const_mem_fun1_t class template divides class template equal_to class template greater class template greater_equal class template less class template less_equal class template logical_and class template logical_not class template logical_or class template mem_fun function template mem_fun_ref function template mem_fun_ref_t class template mem_fun_t class template mem_fun1_ref_t class template mem_fun1_t class template minus class template modulus class template multiplies class template negate class template not1 function template not2 function template not_equal_to class template plus class template pointer_to_binary_function class template pointer_to_unary_function class template ptr_fun function template unary_negate class template unary_function class template
13.26. <iomanip>
resetiosflags function setbase function setfill function template setiosflags function setprecision function setw function
13.27. <ios>
basic_ios class template boolalpha function dec function fixed function fpos class template hex function internal function ios_base class ios_base::event type ios_base::event_callback type ios_base::failure class ios_base::fmtflags type ios_base::Init class ios_base::iostate type ios_base::openmode type ios_base::seekdir type left function noboolalpha function noshowbase function noshowpoint function noshowpos function noskipws function nounitbuf function nouppercase function oct function right function scientific function showbase function showpoint function showpos function skipws function streamoff type streamsize type unitbuf function uppercase function
13.28. <iosfwd> 13.29. <iostream>
cerr variable cin variable clog variable cout variable wcerr variable wcin variable wclog variable wcout variable
13.30. <istream>
basic_iostream class template basic_istream class template basic_istream::sentry class iostream class istream class operator>> function template operator>> function template wiostream class wistream class ws function
13.31. <iterator>
advance function template back_insert_iterator class template back_inserter function template bidirectional_iterator_tag class distance function template forward_iterator_tag class front_insert_iterator class template front_inserter function template input_iterator_tag class insert_iterator class template inserter function template istream_iterator class template istreambuf_iterator class template iterator class template iterator_traits class template iterator_traits<T*> template specialization iterator_traits<const T*> template specialization ostream_iterator class template ostreambuf_iterator class template output_iterator_tag class random_access_iterator_tag class reverse_iterator class template
13.32. <limits>
float_denorm_style type float_round_style type numeric_limits class template
13.33. <list>
list class template operator== function template operator!= function template operator< function template operator<= function template operator> function template operator>= function template swap function template
13.34. <locale>
codecvt class template codecvt_base class codecvt_byname class template collate class template collate_byname class template ctype class template ctype<char> class ctype_base class ctype_byname class template ctype_byname<char> class has_facet function template isalnum function template isalpha function template iscntrl function template isdigit function template isgraph function template islower function template isprint function template ispunct function template isspace function template isupper function template isxdigit function template locale class locale::category type locale::facet class locale::id class messages class template messages_base class messages_byname class template money_base class money_get class template money_put class template moneypunct class template moneypunct_byname class template num_get class template num_put class template numpunct class template numpunct_byname class template time_base class time_get class template time_get_byname class template time_put class template time_put_byname class template tolower function template toupper function template use_facet function template
13.35. <map>
map class template multimap class template operator== function template operator!= function template operator< function template operator<= function template operator> function template operator>= function template swap function template
13.36. <memory>
allocator class template allocator<void> class auto_ptr class template get_temporary_buffer function template operator== function template operator!= function template raw_storage_iterator class template return_temporary_buffer function template uninitialized_copy function template uninitialized_fill function template uninitialized_fill_n function template
13.37. <new>
bad_alloc class nothrow object operator delete operator new set_new_handler function
13.38. <numeric>
accumulate function template adjacent_difference function template inner_product function template partial_sum function template
13.39. <ostream>
basic_ostream class template basic_ostream::sentry class endl function template ends function template flush function template operator<< function template ostream class wostream class
13.40. <queue>
operator== function template operator!= function template operator< function template operator<= function template operator> function template operator>= function template priority_queue class template queue class template
13.41. <set>
multiset class template operator== function template operator!= function template operator< function template operator<= function template operator> function template operator>= function template set class template swap function template
13.42. <sstream>
basic_istringstream class template basic_ostringstream class template basic_stringbuf class template basic_stringstream class template istringstream class ostringstream class stringbuf class stringstream class wistringstream class wostringstream class wstringbuf class wstringstream class
13.43. <stack>
operator== function template operator!= function template operator< function template operator<= function template operator> function template operator>= function template stack class template
13.44. <stdexcept>
domain_error class invalid_argument class length_error class logic_error class out_of_range class overflow_error class range_error class runtime_error class underflow_error class
13.45. <streambuf>
basic_streambuf class template streambuf class wstreambuf class
13.46. <string>
basic_string class template char_traits class template char_traits<char> class char_traits<wchar_t> class getline function template operator+ function template operator== function template operator!= function template operator< function template operator<= function template operator> function template operator>= function template operator<< function template operator>> function template string class swap function template wstring class
13.47. <strstream>
istrstream class ostrstream class strstream class strstreambuf class
13.48. <typeinfo>
bad_cast class bad_typeid class type_info class
13.49. <utility>
make_pair function template operator== function template operator!= function template operator< function template operator<= function template operator> function template operator>= function template pair class template rel_ops namespace
13.50. <valarray>
abs function template acos function template asin function template atan function template atan2 function template cos function template cosh function template exp function template gslice class gslice_array class template indirect_array class template log function template log10 function template mask_array class template operator* function template operator/ function template operator+ function template operator- function template operator& function template operator| function template operator^ function template operator>> function template operator<< function template operator&& function template operator|| function template operator== function template operator!= function template operator< function template operator<= function template operator> function template operator>= function template pow function template sin function template sinh function template slice class slice_array class template sqrt function template tan function template tanh function template valarray class template
13.51. <vector>
operator== function template operator!= function template operator< function template operator<= function template operator> function template operator>= function template swap function template vector class template vector<bool> class vector<bool>::reference class
A. Compiler Extensions
A.1. Borland C++ Builder and Kylix A.2. GNU Compiler Collection A.3. Microsoft Visual C++
B. Projects
B.1. Blitz++ B.2. Boost B.3. STLport
Glossary Colophon
  • ← Prev
  • Back
  • Next →
  • ← Prev
  • Back
  • Next →

Chief Librarian: Las Zenow <zenow@riseup.net>
Fork the source code from gitlab
.

This is a mirror of the Tor onion service:
http://kx5thpx2olielkihfyo4jgjqfb7zx7wxr3sd4xzt26ochei4m6f7tayd.onion