You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cpp/arrays-cpp.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -164,7 +164,7 @@ int i2[5][7];
164
164
165
165
It specifies an array of type **`int`**, conceptually arranged in a two-dimensional matrix of five rows and seven columns, as shown in the following figure:
166
166
167
-
 <br/>
167
+
 <br/>
168
168
Conceptual layout of a multi-dimensional array
169
169
170
170
You can declare multidimensioned arrays that have an initializer list (as described in [Initializers](../cpp/initializers.md)). In these declarations, the constant expression that specifies the bounds for the first dimension can be omitted. For example:
Copy file name to clipboardExpand all lines: docs/cpp/cpp-bit-fields.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,7 @@ struct Date {
62
62
63
63
then the memory layout is as shown in the following figure:
64
64
65
-
 <br/>
65
+
 <br/>
66
66
Layout of Date Object with Zero-Length Bit Field
67
67
68
68
The underlying type of a bit field must be an integral type, as described in [Built-in types](../cpp/fundamental-types-cpp.md).
Copy file name to clipboardExpand all lines: docs/cpp/function-overloading.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -283,7 +283,7 @@ This same rule applies to pointer-to-member conversions. Conversion from type `T
283
283
284
284
The preceding rule applies only along a given path of derivation. Consider the graph shown in the following figure.
285
285
286
-
 <br/>
286
+
 <br/>
287
287
Multiple-inheritance graph that shows preferred conversions
288
288
289
289
Conversion from type `C*` to type `B*` is preferable to conversion from type `C*` to type `A*`. The reason is that they are on the same path, and `B*` is closer. However, conversion from type `C*` to type `D*` isn't preferable to conversion to type `A*`; there's no preference because the conversions follow different paths.
Copy file name to clipboardExpand all lines: docs/cpp/multiple-base-classes.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ Simulated lunch-line graph
48
48
49
49
In the figure, `Queue` is the base class for both `CashierQueue` and `LunchQueue`. However, when both classes are combined to form `LunchCashierQueue`, the following problem arises: the new class contains two subobjects of type `Queue`, one from `CashierQueue` and the other from `LunchQueue`. The following figure shows the conceptual memory layout (the actual memory layout might be optimized).
50
50
51
-
 <br/>
51
+
 <br/>
52
52
Simulated lunch-line object
53
53
54
54
Note that there are two `Queue` subobjects in the `LunchCashierQueue` object. The following code declares `Queue` to be a virtual base class:
@@ -64,17 +64,17 @@ class LunchCashierQueue : public LunchQueue, public CashierQueue {};
64
64
65
65
The **`virtual`** keyword ensures that only one copy of the subobject `Queue` is included (see the following figure).
66
66
67
-
<br/>
67
+
<br/>
68
68
Simulated lunch-line object with virtual base classes
69
69
70
70
A class can have both a virtual component and a nonvirtual component of a given type. This happens in the conditions illustrated in the following figure.
71
71
72
-
<br/>
72
+
<br/>
73
73
Virtual and non-virtual components of the same class
74
74
75
75
In the figure, `CashierQueue` and `LunchQueue` use `Queue` as a virtual base class. However, `TakeoutQueue` specifies `Queue` as a base class, not a virtual base class. Therefore, `LunchTakeoutCashierQueue` has two subobjects of type `Queue`: one from the inheritance path that includes `LunchCashierQueue` and one from the path that includes `TakeoutQueue`. This is illustrated in the following figure.
76
76
77
-
<br/>
77
+
<br/>
78
78
Object layout with virtual and non-virtual inheritance
79
79
80
80
> [!NOTE]
@@ -199,7 +199,7 @@ If virtual base classes are used, functions, objects, types, and enumerators can
199
199
200
200
The following figure shows how objects are composed using virtual and nonvirtual inheritance.
201
201
202
-
 <br/>
202
+
<br/>
203
203
Virtual and non-virtual derivation
204
204
205
205
In the figure, accessing any member of class `A` through nonvirtual base classes causes an ambiguity; the compiler has no information that explains whether to use the subobject associated with `B` or the subobject associated with `C`. However, when `A` is specified as a virtual base class, there is no question which subobject is being accessed.
Copy file name to clipboardExpand all lines: docs/cpp/scope-visual-cpp.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ There are six kinds of scope:
29
29
30
30
You can hide a name by declaring it in an enclosed block. In the following figure, `i` is redeclared within the inner block, thereby hiding the variable associated with `i` in the outer block scope.
31
31
32
-
<br/>
32
+
<br/>
33
33
Block scope and name hiding
34
34
35
35
The output from the program shown in the figure is:
In "single inheritance," a common form of inheritance, classes have only one base class. Consider the relationship illustrated in the following figure.
11
11
12
-
<br/>
12
+
<br/>
13
13
Simple Single-Inheritance Graph
14
14
15
15
Note the progression from general to specific in the figure. Another common attribute found in the design of most class hierarchies is that the derived class has a "kind of" relationship with the base class. In the figure, a `Book` is a kind of a `PrintedDocument`, and a `PaperbackBook` is a kind of a `book`.
Copy file name to clipboardExpand all lines: docs/cpp/standard-conversions.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -181,7 +181,7 @@ The first case is when the specified base class is accessible and the conversion
181
181
182
182
Whether a base class is accessible depends on the kind of inheritance used in derivation. Consider the inheritance illustrated in the following figure.
183
183
184
-
<br/>
184
+
<br/>
185
185
Inheritance Graph for Illustration of Base-Class Accessibility
186
186
187
187
The following table shows the base-class accessibility for the situation illustrated in the figure.
0 commit comments