Index
A
- abundant number
- about / 6. Abundant numbers
- determining / 6. Abundant numbers
- accessor method / Defining class behavior
- aggregate types / Reviewing structures
- algorithms
- about / Algorithms
- iteration of items / Iteration of items
- information, gathering / Getting information
- alias templates
- creating / Creating type aliases and alias templates
- Allman style / Formatting Code
- amicable numbers
- about / 7. Amicable numbers
- computing / 7. Amicable numbers
- anonymous namespace / Using Namespaces
- application termination / Application termination
- argument lists / Argument lists
- arithmetic operators / Arithmetic Operators
- Armstrong number
- about / 8. Armstrong numbers
- computing / 8. Armstrong numbers
- article title
- capitalizing / 25. Capitalizing an article title
- asserts
- about / Pre- and post-conditions
- using / Using asserts
- assignment operators / Assignment Operators
- associative containers
- about / Associative containers
- map container / Maps and multimaps
- multimaps container / Maps and multimaps
- sets / Sets and multisets
- multisets / Sets and multisets
- unordered containers / Unordered containers
- auto specifier
- using / Using auto whenever possible
- benefits / How it works...
B
- back pointer / Handling dangling pointers
- binary to string conversion
- implementing / 23. Binary to string conversion
- binder object / Defining function classes
- bitset
- using, for fixed-size sequence of bits / Using bitset for fixed-size sequences of bits
- bitwise operators / Bitwise Operators
- bitwise shift operators / Bitwise Shift Operators
- Boolean operators / Boolean Operators
- Boyer-Moore-Horspool string searching algorithm / How to do it...
- break statement / Selecting
- broad styles, C++ / Formatting Code
- Allman / Formatting Code
C
- C++
- writing / Writing C++
- broad styles / Formatting Code
- functions, using in / Using functions in C++
- C++, and SEH exception handling
- mixing / Mixing C++ and SEH exception handling
- C++ exceptions
- about / C++ exceptions
- specifications / Exception specifications
- syntax / C++ exception syntax
- standard exception classes / Standard exception classes
- exceptions, catching by type / Catching exceptions by type
- function try blocks / Function try blocks
- system errors / System errors
- nested exceptions / Nested exceptions
- Structured Exception Handling (SEH) / Structured Exception Handling
- compiler exception switches / Compiler exception switches
- exception-safe classes, writing / Writing exception-safe classes
- C++ functions
- defining / Defining C++ functions
- C++ language features
- using / Using C++ language features
- C++ macros
- advantages / How it works...
- C++ pointer syntax
- using / Using C++ pointer syntax
- C++ scoping
- of variables / C++ Scoping of Variables
- C++ Standard Library / Defining classes
- C-locale / Using facets
- callable object
- invoking / Uniformly invoking anything callable
- callback pointer / Using function pointers
- call stack / Call stack
- capture list / Introducing lambda expressions
- class behavior
- defining / Defining class behavior
- classes
- writing / Writing classes
- defining / Defining classes
- making friends / Making friends
- using / Using classes
- class state
- defining / Defining class state
- C linkage
- using / Using C linkage
- code
- formatting / Formatting Code
- preparing / Preparing your code
- Collatz conjecture / 12. Largest Collatz sequence
- comma operator
- using /
- Comma Separated Value (CSV) / Using the Standard Library
- compiler switches
- for debugging / Compiler switches for debugging
- compile time arithmetic / Compile time arithmetic
- complex numbers / Complex numbers
- conatiners
- associative containers / Associative containers
- conditional compilation / Conditional compilation
- conditional loops / Conditional Loops
- conditional statements
- using / Using Conditional Statements
- conditions / Invariants and conditions
- constant expressions
- about / Defining constants
- using / Using Constant Expressions
- constants
- defining / Defining constants
- const objects
- accessing / Accessing const objects
- constructors
- about / Construction of objects
- default constructor / Construction of objects
- copy constructor / Construction of objects, Copy constructor
- move constructor / Construction of objects
- defining / Defining constructors
- delegating / Delegating constructors
- marking, as explicit / Marking constructors as explicit
- named constructors / Named constructors
- container
- iterators, using to insert elements / Using iterators to insert new elements in a container
- range of values, adding / 19. Adding a range of values to a container
- elements, evaluating / 20. Container any, all, none
- container adapters
- about / Special purpose containers
- containers
- about / Containers
- sequence containers / Sequence containers
- special purpose containers / Special purpose containers
- comparing / Comparing containers
- string class, using as / Using the string class as a container
- control block / Sharing ownership
- conversion operators
- defining / Defining conversion operators
- using, to avoid implicit conversion / Using explicit constructors and conversion operators to avoid implicit conversion
- cooked user-defined literals
- creating / Creating cooked user-defined literals
- copy assignment / Construction of objects
- copy constructor / Construction of objects, Copy constructor
- C runtime
- messages, tracing with / Trace messages with the C runtime
- C Standard Library
- iterators, using with / Using iterators with the C Standard Library
- custom random access iterator
- writing / Writing your own random access iterator
- custom types
- range-based for loops, enabling / Enabling range-based for loops for custom types
D
- 2D array
- creating, with basic operations / 17. Creating a 2D array with basic operations
- dangling pointers
- about / Sharing ownership
- handling / Handling dangling pointers
- data structure, issues
- priority queue / 45. Priority queue
- circular buffer / 46. Circular buffer
- double buffer / 47. Double buffer
- frequent element, in range / 48. The most frequent element in a range
- text histogram / 49. Text histogram
- list of phone numbers, filtering / 50. Filtering a list of phone numbers
- list of phone numbers, transforming / 51. Transforming a list of phone numbers
- permutations of string, generating / 52. Generating all the permutations of a string
- list of movies, average rating / 53. Average rating of movies
- pairwise algorithm / 54. Pairwise algorithm
- zip algorithm / 55. Zip algorithm
- select algorithm / 56. Select algorithm
- sort algorithm / 57. Sort algorithm
- nodes, shortest path / 58. The shortest path between nodes
- weasel program / 59. The Weasel program
- game of life / 60. The Game of Life
- data structure, solutions
- priority queue / 45. Priority queue
- circular buffer / 46. Circular buffer
- double buffer / 47. Double buffer
- frequent element, in range / 48. The most frequent element in a range
- text histogram / 49. Text histogram
- list of phone numbers, filtering / 50. Filtering a list of phone numbers
- list of phone numbers, transforming / 51. Transforming a list of phone numbers
- permutations of string, generating / 52. Generating all the permutations of a string
- list of movies, average rating / 53. Average rating of movies
- pairwise algorithm / 54. Pairwise algorithm
- zip algorithm / 55. Zip algorithm
- select algorithm / 56. Select algorithm
- sort algorithm / 57. Sort algorithm
- nodes, shortest path / 58. The shortest path between nodes
- weasel program / 59. The Weasel program
- game of life / 60. The Game of Life
- date library
- reference / 40. Number of days between two dates
- dates
- transforming, in strings / 31. Transforming dates in strings
- day and week of year
- determining / 42. Day and week of the year
- day of week
- determining / 41. Day of the week
- debug builds / Pre- and post-conditions
- decrement operator / Increment and Decrement Operators
- default constructor / Construction of objects
- defaulted functions / Defaulted and deleted functions
- deleted functions / Deleted functions, Defaulted and deleted functions
- deleter / Managing exclusive ownership
- deque / Deque
- destructor / Construction of objects
- diagnostic messages
- producing / Producing diagnostic messages
- digits constant
- versus digits10 constant / How it works...
- direct initialization / Creating objects
- directory
- size, computing / 35. Computing the size of a directory
- files, searching that match a regular expression / 37. Finding files in a directory that match a regular expression
- dynamic linked library / Using C linkage
- Dynamic Link Library (DLL) / Compiler switches for debugging
E
- ECMAScript / Standard Library classes
- elements
- in range, searching / Finding elements in a range
- emplace methods / List
- end of sequence iterator / Using iterators
- end of stream iterator / Stream iterators
- engine adapters
- about / How it works...
- discard_block_engine / How it works...
- independent_bits_engine / How it works...
- shuffle_order_engine / How it works...
- enumerations
- using / Using Enumerations
- error values
- about / Error values
- message descriptions, obtaining / Obtaining message descriptions
- message compiler, using / Using the Message Compiler
- escaping characters
- avoiding, raw string literals used / Using raw string literals to avoid escaping characters
- execution flow
- controlling / Controlling Execution Flow
- explicit constructors
- using, to avoid implicit conversion / Using explicit constructors and conversion operators to avoid implicit conversion
- expressions
- working with / Working with Expressions
- external linkage / C++ Scoping of Variables
F
- facet class / Using facets
- facets
- using / Using facets
- facet type
- codecvt / Using facets
- ctype / Using facets
- collate / Using facets
- messages / Using facets
- money / Using facets
- num / Using facets
- time / Using facets
- factory method / Named constructors
- files
- older files, deleting / 36. Deleting files older than a given date
- searching, in directory that match regular expression / 37. Finding files in a directory that match a regular expression
- temporary log files, creating / 38. Temporary log files
- final
- using, for virtual methods / Using override and final for virtual methods
- first-in first-out (FIFO) queue / Special purpose containers
- fixed-size sequences of bits
- bitset, using for / Using bitset for fixed-size sequences of bits
- floating point numbers
- outputting / Outputting floating point numbers
- forward declaration / Declaring and defining functions
- forward iterators / Using iterators
- forward list / Forward list
- function body / Function body
- function classes
- defining / Defining function classes
- function execution time
- measuring / 39. Measuring function execution time
- function objects / Function objects
- function parameters
- about / Function parameters
- using / Using function parameters
- initializer lists, passing as parameter / Passing Initializer lists
- default parameters, using / Using default parameters
- variable number of parameters / Variable number of parameters
- function pointers
- about / Function pointers
- declaring / Declaring function pointers
- using / Using function pointers
- functions
- declaring / Declaring and defining functions
- defining / Declaring and defining functions
- linkage, specifying / Specifying linkage
- inline specifier / Inlining
- return type, determining / Determining the return type
- naming / Naming the function
- exceptions, specifying / Specifying exceptions
- overloading / Overloading functions
- designing / Designing functions
- post-conditions / Pre- and post-conditions
- pre-conditions / Pre- and post-conditions
- using, in C++ / Using functions in C++
- composing, into higher-order function / Composing functions into a higher-order function
- functions, features
- about / Function features
- call stack / Call stack
- calling conventions, specifying / Specifying calling conventions
- recursion / Using recursion
- functions, overloading / Overloading functions
- function scope / Functions and scope
- deleted functions / Deleted functions
- pass-by-value / Passing by value and passing by reference
- pass-by-reference / Passing by value and passing by reference
- function scope / Functions and scope
- function template
- writing, with variable number of arguments / Writing a function template with a variable number of arguments
- functor / Function objects, Defining function classes
G
- generic lambdas
- using / Using generic lambdas
- global objects
- using / Using static and global objects
- Gray code
- about / 10. Gray code
- performing / 10. Gray code
- greatest common divisor (gcd)
- calculating / 2. Greatest common divisor
- greatest common factor (gcf) / 2. Greatest common divisor
- greatest common measure (gcm) / 2. Greatest common divisor
H
- Hasse's algorithm / 12. Largest Collatz sequence
- higher-order function
- implementing / Implementing higher-order functions map and fold, There's more...
- functions, composing into / Composing functions into a higher-order function
- highest common divisor / 2. Greatest common divisor
- highest common factor (hcf) / 2. Greatest common divisor
I
- implicit conversion
- avoiding, explicit constructors used / Using explicit constructors and conversion operators to avoid implicit conversion
- avoiding, conversion operators used / Using explicit constructors and conversion operators to avoid implicit conversion
- increment operator / Increment and Decrement Operators
- informational messages
- adding / Adding informational messages
- initializer lists / Initializer lists
- inline namespace / Using Namespaces
- inline namespaces
- used, for symbol versioning / Using inline namespaces for symbol versioning
- inlining / Inlining
- input iterators / Input and output iterators
- instance / Reviewing structures
- integers
- outputting / Outputting integers
- internal linkage / Using Namespaces
- internationalization / Internationalization
- internationalization rules
- facets / Using facets
- International Obfuscated C Code Contest
- reference / Using whitespace
- International Standard Book Number (ISBN)
- validating / 14. Validating ISBNs
- invariants
- using / Using invariants
- about / Invariants and conditions
- IPv4 addresses
- enumerating, in range / 16. Enumerating IPv4 addresses in a range
- IPv4 data type
- representing / 15. IPv4 data type
- items
- modifying / Changing Items
- finding / Finding Items
- sorting / Sorting items
- iteration of items / Iteration of items
- iterator
- used, for inserting elements in container / Using iterators to insert new elements in a container
- URL / Getting ready
- input iterators / How it works...
- output iterators / How it works...
- forward iterators / How it works...
- bidirectional iterators / How it works...
- random access iterators / How it works...
- iterators
- using / Using iterators, Using iterators
- behaviors / Using iterators
- input iterators / Input and output iterators
- output iterators / Input and output iterators
- stream iterators / Stream iterators
- using, with C Standard Library / Using iterators with the C Standard Library
J
- jumps / Jumping
- Just-in-Time (JIT) / Using asserts
K
- Kakutani's problem / 12. Largest Collatz sequence
L
- lambda closure / How it works...
- lambda expression / Introducing lambda expressions
- lambdas
- using, with standard algorithms / Using lambdas with standard algorithms
- largest Collatz sequence
- determining / 12. Largest Collatz sequence
- largest prime number
- computing / 4. Largest prime smaller than given number
- last-in first-out (LIFO) container / Special purpose containers
- least common multiple (lcm)
- computing / 3. Least common multiple
- license plate validation
- with regular expressions / 29. License plate validation
- list initialization / Looping with Iteration
- list object / List
- literals
- using / Using constants and literals
- literals, of various temperature scales
- defining / 22. Literals of various temperature scales
- longest palindromic substring
- determining / 28. Longest palindromic substring
- looping
- about / Looping
- with iteration / Looping with Iteration
- conditional loops / Conditional Loops
- lvalue / Working with Expressions
M
- manipulator / Using constants and literals
- map container / Maps and multimaps
- meeting time
- printing, for multiple time zones / 43. Meeting time for multiple time zones
- member list / Defining constructors
- memory
- using, in C++ / Using memory in C++
- Message Compiler / Using facets
- messages
- tracing, with C runtime / Trace messages with the C runtime
- tracing, with Windows / Tracing messages with Windows
- methods
- about / Defining class behavior
- minimum function
- creating, for multiple arguments / 18. Minimum function with any number of arguments
- money
- outputting / Outputting time and money
- monthly calendar
- printing / 44. Monthly calendar
- move assignment / Construction of objects
- move constructor / Construction of objects
- move semantics / Move semantics
- MSBuild / Declaring and defining functions
- multi-return values
- handling, structured bindings used / Using structured bindings to handle multi-return values
- multimaps container / Maps and multimaps
- multisets / Sets and multisets
- mutable iterators / How it works...
N
- named constructors / Named constructors
- name mangling / Using C linkage
- namespaces
- using / Using Namespaces
- nanometers (nm) / Compile time arithmetic
- narcissistic number / 8. Armstrong numbers
- naturals divisible by 3 and 5
- summation, calculating / 1. Sum of naturals divisible by 3 and 5
- nested classes / Nested classes
- nmake / Declaring and defining functions
- non-member functions
- container access / Container access with non-member functions
- non-static member
- initializing / Understanding the various forms of non-static member initialization, How it works...
- normal / Using Constant Expressions
- number of days between two dates
- calculating / 40. Number of days between two dates
- numbers
- strings, converting to / Converting strings to numbers
- converting, to strings / Converting numbers to strings
- numerical values
- converting, to Roman / 11. Converting numerical values to Roman
- numeric libraries
- using / Using the numeric libraries
- numeric type
- converting, to string type / Converting between numeric and string types
- limitations / Limits and other properties of numeric types, How it works...
- properties / Limits and other properties of numeric types, How it works...
O
- object alignment
- controlling / Controlling and querying object alignment
- querying / Controlling and querying object alignment
- object members
- pointers, accessing to / Getting pointers to object members
- objects
- about / Reviewing structures
- creating / Creating objects
- constructing / Construction of objects
- destructing / Destructing objects
- assigning / Assigning objects
- using, with pointers / Using objects with pointers
- operator overloading / Operator overloading
- operators
- using / Using Operators
- arithmetic operators / Arithmetic Operators
- increment operator / Increment and Decrement Operators
- decrement operator / Increment and Decrement Operators
- bitwise operators / Bitwise Operators
- Boolean operators / Boolean Operators
- bitwise shift operators / Bitwise Shift Operators
- assignment operators / Assignment Operators
- output iterators / Input and output iterators
- overloaded operators / Overloaded operators
- override
- using, for virtual methods / Using override and final for virtual methods
P
- pages / Structured Exception Handling
- pairs
- working with / Working with pairs and tuples
- partial specialization / Templates
- Pascal's triangle
- about / 32. Pascal's triangle
- printing / 32. Pascal's triangle
- pass-by-reference / Using function parameters, Passing by value and passing by reference
- pass-by-value / Passing by value and passing by reference
- Pi
- value, computing / 13. Computing the value of Pi
- placeholder / Defining function classes
- pointers
- declaring / Declaring Pointers
- objects, using with / Using objects with pointers
- accessing, to object members / Getting pointers to object members
- pragmas
- using / Using pragmas
- pre-processor symbols / Pre-processor symbols
- prime factors
- about / 9. Prime factors of a number
- determining / 9. Prime factors of a number
- process lists
- printing / 33. Tabular printing of a list of processes
- program database / Compiler switches for debugging
- pseudo-random number generator
- bits, initializing of internal state / Initializing all bits of internal state of a pseudo-random number generator
- pseudo-random numbers
- generating / Generating pseudo-random numbers, How it works...
- pseudo-random numbers, components
- engines / How it works...
- distributions / How it works...
Q
- Quicksort / 57. Sort algorithm
R
- range-based for loops
- using, to iterate on range / Using range-based for loops to iterate on a range
- enabling, for custom types / Enabling range-based for loops for custom types
- range initializing / Initializing a range
- range sorting / Sorting a range
- raw string literals
- used, for avoiding escaping characters / Using raw string literals to avoid escaping characters
- raw user-defined literals
- creating / Creating raw user-defined literals, How it works...
- recursion
- using / Using recursion
- recursive lambda
- writing / Writing a recursive lambda
- reference count / Sharing ownership
- regular expression (regex)
- using / Using regular expressions
- defining / Defining regular expressions
- expressions, matching / Matching expressions
- iterators, using / Using iterators
- string, replacing / Replacing strings
- regular expressions
- used, for verifying string format / Verifying the format of a string using regular expressions
- used, for parsing string content / Parsing the content of a string using regular expressions
- used, for replacing string content / Replacing the content of a string using regular expressions
- used, for license plate validation / 29. License plate validation
- reference / 30. Extracting URL parts
- regular expressions standard library
- algorithms / There's more...
- iterators / There's more...
- release builds / Pre- and post-conditions
- Remote Procedure Calls (RPC) / Structured Exception Handling
- Resource Acquisition Is Initialization (RAII) / Managing resources
- Resource Acquisition Is Initialization technique / Using classes
- Resource Release Destruction (RRD) / Writing exception-safe classes
- resources
- managing / Managing resources
- reverse function / Changing Items
- reverse iterators / Using iterators
- Roman numerals
- about / 11. Converting numerical values to Roman
- numerical values, converting / 11. Converting numerical values to Roman
- rvalue / Working with Expressions
S
- scoped enumerations
- using / Using scoped enumerations
- scope resolution operator
- using / Using the scope resolution operator
- sequence containers
- about / Sequence containers
- list object / List
- forward list / Forward list
- vector class / Vector
- deque / Deque
- set operations
- using, on range / Using set operations on a range
- sets / Sets and multisets
- sexy prime pairs
- about / 5. Sexy prime pairs
- computing / 5. Sexy prime pairs
- smart pointers
- using / Using smart pointers
- exclusive ownership, managing / Managing exclusive ownership
- ownership, sharing / Sharing ownership
- specialized templates / Specialized templates
- special purpose containers
- about / Special purpose containers
- stack maintenance
- specifying / Specifying how the stack Is maintained
- stack unwinding / C++ exception syntax
- Standard Library
- compile time arithmetic / Compile time arithmetic
- complex numbers / Complex numbers
- using / Using the Standard Library
- statements
- writing / Writing Statements
- static members
- declaring / Declaring static members
- defining / Defining static members
- static objects
- using / Using static and global objects
- std
- sort() / How it works...
- stable_sort() / How it works...
- partial_sort() / How it works...
- partial_sort_copy() / How it works...
- nth_element() / How it works...
- is_sorted() / How it works...
- is_sorted_until() / How it works...
- stduuid
- reference / 38. Temporary log files
- ston (string to number) / How it works...
- stream classes
- using / Using stream classes
- stream iterators / Stream iterators
- streams
- used, for converting numbers to strings / Converting numbers to strings using streams
- used, for reading numbers from strings / Reading numbers from strings using streams
- string
- about / Getting information about a string
- altering / Altering strings
- searching / Searching strings
- converting, to numbers / Converting strings to numbers
- numbers, converting to / Converting numbers to strings
- using / Using strings
- project, creating / Creating the project
- header subitems, processing / Processing header subitems
- format, verifying with regular expressions / Verifying the format of a string using regular expressions
- content, parsing with regular expressions / Parsing the content of a string using regular expressions
- content, replacing with regular expressions / Replacing the content of a string using regular expressions
- string class
- using, as container / Using the string class as a container
- string helpers
- library, creating / Creating a library of string helpers, How it works...
- string pooling / Types of Memory
- strings
- joining together / 26. Joining strings together separated by a delimiter
- splitting, into tokens with list of possible delimiters / 27. Splitting a string into tokens with a list of possible delimiters
- dates, transforming / 31. Transforming dates in strings
- string to binary conversion
- implementing / 24. String to binary conversion
- string type
- converting, to numeric type / Converting between numeric and string types
- string_view
- using, instead of constant string references / Using string_view instead of constant string references
- struct type / Reviewing structures
- structured bindings
- using, to handle multi-return values / Using structured bindings to handle multi-return values
- Structured Exceptions Handling (SEH) / Structured Exception Handling
- structures
- reviewing / Reviewing structures
- subtract with carry algorithm / How it works...
- switch statement / Selecting
- symbol server / Compiler switches for debugging
- symbol versioning
- inline namespaces, used / Using inline namespaces for symbol versioning
- Syracuse problem / 12. Largest Collatz sequence
- system handles
- about / 21. System handle wrapper
- defining / 21. System handle wrapper
T
- Task List / Adding informational messages
- templated functions
- about / Templated functions
- templates, defining / Defining templates
- template parameter values
- using / Using template parameter values
- templates / Templates
- temporary log files
- creating / 38. Temporary log files
- text file
- empty lines, removing / 34. Removing empty lines from a text file
- this pointer
- using / Using the this pointer
- Thwaites conjecture / 12. Largest Collatz sequence
- time
- outputting / Outputting time and money
- time zones
- meeting time, printing / 43. Meeting time for multiple time zones
- reference / 43. Meeting time for multiple time zones
- trailing return type / Determining the return type
- translation units / C++ Scoping of Variables
- tuples
- working with / Working with pairs and tuples
- type aliases
- creating / Creating type aliases and alias templates
- types
- converting between / Converting between types
U
- Ulam conjecture / 12. Largest Collatz sequence
- unary operator / Operator overloading
- uniform initialization / Understanding uniform initialization
- unnamed namespaces
- using / Using unnamed namespaces instead of static globals
- unordered conatiners / Unordered containers
- URL parts
- extracting / 30. Extracting URL parts
V
- variable-size sequences of bits
- vector bool, using / Using vector<bool> for variable-size sequences of bits
- variable number of arguments
- function template, writing / Writing a function template with a variable number of arguments
- variable number of parameters
- initializer lists / Initializer lists
- argument lists / Argument lists
- variables
- using / Using Types and Variables
- variadic functions / Getting ready
- variadic function templates
- simplifying, fold expressions used / Using fold expressions to simplify variadic function templates
- variadic template / Variadic templates
- vector
- using, as default container / Using vector as a default container
- vector class / Vector
- virtual methods
- override, using / Using override and final for virtual methods
- final, using / Using override and final for virtual methods
W
- weak pointer / Handling dangling pointers
- white space
- using / Using whitespace
- Windows
- messages, tracing with / Tracing messages with Windows
- windowsZones.xml file
- URL / 43. Meeting time for multiple time zones
- wrapper classes
- writing / Writing wrapper classes