Bjarne Stroustrup, (Stroustrup 2022)
Notes
Skeleton
Cover
Half Title
Title Page
Copyright Page
Contents
Preface
1 The Basics
1.1 Introduction
- 1.2 Programs
- 1.3 Functions
- 1.4 Types, Variables, and Arithmetic
- 1.5 Scope and Lifetime
- 1.6 Constants
- 1.7 Pointers, Arrays, and References
- 1.8 Tests
- 1.9 Mapping to Hardware
- 1.10 Advice
2 User-Defined Types
- 2.1 Introduction
2.2 Structures
2.3 Classes
- 2.4 Enumerations
2.5 Unions
- 2.6 Advice
3 Modularity
- 3.1 Introduction
- 3.2 Separate Compilation
- 3.3 Namespaces
3.4 Function Arguments and Return Values
- 3.5 Advice
4 Error Handling
- 4.1 Introduction
- 4.2 Exceptions
- 4.3 Invariants
- 4.4 Error-Handling Alternatives
- 4.5 Assertions
- 4.6 Advice
5 Classes
- 5.1 Introduction
5.2 Concrete Types
5.3 Abstract Types
5.4 Virtual Functions
- 5.5 Class Hierarchies
- 5.6 Advice
6 Essential Operations
- 6.1 Introduction
- 6.3 Resource Management
- 6.4 Operator Overloading
- 6.5 Conventional Operations
- 6.6 User-Defined Literals
- 6.7 Advice
7 Templates
- 7.1 Introduction
- 7.2 Parameterized Types
- 7.3 Parameterized Operations
- 7.4 Template Mechanisms
- 7.5 Advice
8 Concepts and Generic Programming
- 8.1 Introduction
- 8.2 Concepts
- 8.3 Generic Programming
- 8.4 Variadic Templates
- 8.5 Template Compilation Model
- 8.6 Advice
9 Library Overview
- 9.1 Introduction
- 9.2 Standard-Library Components
- 9.3 Standard-Library Organization
- 9.4 Advice
10 Strings and Regular Expressions
- 10.1 Introduction
- 10.2 Strings
- 10.3 String Views
- 10.4 Regular Expressions
- 10.5 Advice
11 Input and Output
- 11.1 Introduction
- 11.2 Output
- 11.3 Input
- 11.4 I/O State
- 11.5 I/O of User-Defined Types
- 11.6 Output Formatting
- 11.7 Streams
- 11.8 C-style I/O
- 11.9 File System
- 11.10 Advice
12 Containers
- 12.1 Introduction
- 12.2 vector
- 12.3 list
- 12.4 forward_list
- 12.5 map
- 12.6 unordered_map
- 12.7 Allocators
- 12.8 Container Overview
- 12.9 Advice
13 Algorithms
- 13.1 Introduction
- 13.2 Use of Iterators
- 13.3 Iterator Types
- 13.4 Use of Predicates
- 13.5 Algorithm Overview
- 13.6 Parallel Algorithms
- 13.7 Advice
14 Ranges
- 14.1 Introduction
- 14.2 Views
- 14.3 Generators
- 14.4 Pipelines
- 14.5 Concepts Overview
- 14.6 Advice
15 Pointers and Containers
- 15.1 Introduction
15.2 Pointers
- 15.3 Containers
- 15.4 Alternatives
- 15.5 Advice
16 Utilities
- 16.1 Introduction
- 16.2 Time
- 16.3 Function Adaption
- 16.4 Type Functions
- 16.5 source_location
- 16.6 move() and forward()
- 16.7 Bit Manipulation
- 16.8 Exiting a Program
- 16.9 Advice
17 Numerics
- 17.1 Introduction
- 17.2 Mathematical Functions
- 17.3 Numerical Algorithms
- 17.4 Complex Numbers
- 17.5 Random Numbers
- 17.6 Vector Arithmetic
- 17.7 Numeric Limits
- 17.8 Type Aliases
- 17.9 Mathematical Constants
- 17.10 Advice
18 Concurrency
- 18.1 Introduction
- 18.2 Tasks and threads
- 18.3 Sharing Data
- 18.4 Waiting for Events
- 18.5 Communicating Tasks
- 18.6 Coroutines
- 18.7 Advice
19 History and Compatibility
- 19.1 History
- 19.2 C++ Feature Evolution
19.3 C/C++ Compatibility
:NOTER_PAGE: 284
:END:
- 19.5 Advice
Module std
- A.1 Introduction
- A.2 Use What Your Implementation Offers
- A.3 Use Headers
- A.4 Make Your Own module std
- A.5 Advice
Index
- A
- B
- C
- D
- E
- F
- G
- H
- I
- J
- K
- L
- M
- N
- O
- P
- Q
- R
- S
- T
- U
- V
- W
- X
- Y
- Z
Bibliography
References
Compare and contrast
position | ease | box | interval | due |
---|---|---|---|---|
front | 2.50 | 6 | 86.28 | 2023-12-09T21:50:59Z |
int x = 2;
int y = 3;
int& rx = x;
int& ry = y;
rx = ry
// x == ?
// y == ?
// rx == ?
// ry == ?
and
int x = 2;
int y = 3;
int* px = &x;
int* py = &y;
px = py;
// x == ?
// y == ?
// px == ?
// py == ?
Back
In the first, by reference:
x == 2;
y == 2;
rx != ry;
rx == &x;
ry == &y;
And in the second, by pointer:
x == 2;
y == 3;
px == &y;
py == &y;
*px == 3;
*py == 3;
Source
Built-in types
position | ease | box | interval | due |
---|---|---|---|---|
front | 2.50 | 7 | 218.67 | 2024-05-23T00:13:44Z |
back | 2.35 | 7 | 183.14 | 2024-06-04T18:33:16Z |
Types composed of fundamental types (e.g. bool
), the const
modifier, and declarator operators.
Source
Cloze
position | ease | box | interval | due |
---|---|---|---|---|
0 | 2.20 | 7 | 177.63 | 2024-05-05T07:46:50Z |
(C++) A declaration specifies {{a type (e.g. int
) name (e.g. count
)}@0}.
Source
Example(s) (C++)
position | ease | box | interval | due |
---|---|---|---|---|
front | 2.35 | 7 | 197.10 | 2024-05-14T17:22:15Z |
back | 2.05 | 6 | 55.65 | 2023-11-16T05:51:35Z |
Declarations
Back
int count;
char v[7];
void foo(int a);
Source
Cloze
position | ease | box | interval | due |
---|---|---|---|---|
0 | 2.50 | 6 | 109.88 | 2023-12-18T09:50:02Z |
C++’s built-in types reflect {{the capabilities of conventional computer hardware}@0}.
Source
Definition (C++)
position | ease | box | interval | due |
---|---|---|---|---|
front | 2.50 | 7 | 247.20 | 2024-07-13T21:09:31Z |
back | 1.90 | 6 | 42.63 | 2023-12-27T06:40:26Z |
User-defined types
Back
Types built from built-in types and other […].
Source
Normal
What is the value of a
?
int foo(int i) {
return i += 1;
}
int main() {
int a = foo(14);
return a;
}
Back
a == 15
Source
19.4 Bibliography
:PROPERTIES: