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
The class describes the storage and member functions common to both input and output streams that do not depend on the template parameters. (The class template [`basic_ios`](../standard-library/basic-ios-class.md) describes what is common and is dependent on template parameters.)
12
11
13
-
An object of class ios_base stores formatting information, which consists of:
12
+
An object of class `ios_base` stores formatting information, which consists of:
14
13
15
14
- Format flags in an object of type [`fmtflags`](#fmtflags).
16
15
@@ -20,11 +19,11 @@ An object of class ios_base stores formatting information, which consists of:
20
19
21
20
- A display precision in an object of type `int`.
22
21
23
-
- A locale object in an object of type `locale`.
22
+
- A `locale` object in an object of type `locale`.
24
23
25
24
- Two extensible arrays, with elements of type `long` and `void` pointer.
26
25
27
-
An object of class ios_base also stores stream state information, in an object of type [`iostate`](#iostate), and a callback stack.
26
+
An object of class `ios_base` also stores stream state information, in an object of type [`iostate`](#iostate), and a callback stack.
28
27
29
28
## Members
30
29
@@ -90,9 +89,9 @@ An object of class ios_base also stores stream state information, in an object o
90
89
91
90
|Name|Description|
92
91
|-|-|
93
-
|[`failure`](#failure)|The member class serves as the base class for all exceptions thrown by the member function [clear](../standard-library/basic-ios-class.md#clear) in class template [basic_ios](../standard-library/basic-ios-class.md).|
92
+
|[`failure`](#failure)|The member class serves as the base class for all exceptions thrown by the member function [clear](../standard-library/basic-ios-class.md#clear) in class template [`basic_ios`](../standard-library/basic-ios-class.md).|
94
93
|[`flags`](#flags)|Sets or returns the current flag settings.|
95
-
|[`getloc`](#getloc)|Returns the stored locale object.|
94
+
|[`getloc`](#getloc)|Returns the stored `locale` object.|
96
95
|[`imbue`](#imbue)|Changes the locale.|
97
96
|[`Init`](#init)|Creates the standard `iostream` objects when constructed.|
98
97
|[`iword`](#iword)|Assigns a value to be stored as an `iword`.|
@@ -113,9 +112,9 @@ An object of class ios_base also stores stream state information, in an object o
113
112
114
113
## Requirements
115
114
116
-
**Header:**\<ios>
115
+
**Header:**`<ios>`
117
116
118
-
**Namespace:** std
117
+
**Namespace:**`std`
119
118
120
119
## <aname="event"></a> `event`
121
120
@@ -348,15 +347,15 @@ For examples of functions that modify these format flags, see [`<iomanip>`](../s
348
347
349
348
## <a name="getloc"></a> `getloc`
350
349
351
-
Returns the stored locale object.
350
+
Returns the stored `locale` object.
352
351
353
352
```cpp
354
353
locale getloc() const;
355
354
```
356
355
357
356
### Return Value
358
357
359
-
The stored locale object.
358
+
The stored `locale` object.
360
359
361
360
### Example
362
361
@@ -395,7 +394,7 @@ The previous locale.
395
394
396
395
### Remarks
397
396
398
-
The member function stores *`_Loc`* in the locale object and then reports the callback event and `imbue_event`. It returns the previous stored value.
397
+
The member function stores *`_Loc`* in the `locale` object and then reports the callback event and `imbue_event`. It returns the previous stored value.
399
398
400
399
### Example
401
400
@@ -415,15 +414,15 @@ The nested class describes an object whose construction ensures that the standar
415
414
416
415
## <aname="ios_base"></a> `ios_base`
417
416
418
-
Constructs ios_base objects.
417
+
Constructs `ios_base` objects.
419
418
420
419
```cpp
421
420
ios_base();
422
421
```
423
422
424
423
### Remarks
425
424
426
-
The (protected) constructor does nothing. A later call to `basic_ios::`[init](../standard-library/basic-ios-class.md#init) must initialize the object before it can be safely destroyed. Thus, the only safe use for class ios_base is as a base class for class template [basic_ios](../standard-library/basic-ios-class.md).
425
+
The (protected) constructor does nothing. A later call to `basic_ios::`[init](../standard-library/basic-ios-class.md#init) must initialize the object before it can be safely destroyed. Thus, the only safe use for class `ios_base` is as a base class for class template [`basic_ios`](../standard-library/basic-ios-class.md).
427
426
428
427
## <aname="iostate"></a> `iostate`
429
428
@@ -505,7 +504,7 @@ The opening mode for several `iostream` objects. The flag values are:
505
504
| `binary`| Open in binary mode. (See [`fopen`](../c-runtime-library/reference/fopen-wfopen.md) for a description of binary mode.)|
506
505
| `in` | Open for reading |
507
506
| `out` | Open for writing |
508
-
| `trunc` | delete the contents of the file after open |
507
+
| `trunc` | Delete the contents of the file after open |
509
508
510
509
### Example
511
510
@@ -527,7 +526,7 @@ int main ( )
527
526
528
527
## <aname="op_eq"></a> `operator=`
529
528
530
-
The assignment operator for ios_base objects.
529
+
The assignment operator for `ios_base` objects.
531
530
532
531
```cpp
533
532
ios_base& operator=(const ios_base& right);
@@ -564,11 +563,11 @@ The number of significant digits to display, or the number of digits after the d
564
563
565
564
### Return Value
566
565
567
-
The first member function returns the stored [display precision](../standard-library/ios-base-class.md). The second member function stores *_Prec* in the display precision and returns its previous stored value.
566
+
The first member function returns the stored [display precision](../standard-library/ios-base-class.md). The second member function stores *`_Prec`* in the display precision and returns its previous stored value.
568
567
569
568
### Remarks
570
569
571
-
Floating-point numbers are displayed in fixed notation with [fixed](../standard-library/ios-functions.md#fixed).
570
+
Floating-point numbers are displayed in fixed notation with [`fixed`](../standard-library/ios-functions.md#fixed).
572
571
573
572
### Example
574
573
@@ -854,7 +853,7 @@ Previous setting for this function.
854
853
855
854
### Remarks
856
855
857
-
The static member function stores a `stdio` sync flag, which is initially `true`. When `true`, this flag ensures that operations on the same file are properly synchronized between the [`iostreams`](../standard-library/iostreams-conventions.md) functions and those defined in the C++ Standard Library. Otherwise, synchronization may or may not be guaranteed, but performance may be improved. The function stores *_Sync* in the `stdio` sync flag and returns its previous stored value. You can call it reliably only before performing any operations on the standard streams.
856
+
The static member function stores a `stdio` sync flag, which is initially `true`. When `true`, this flag ensures that operations on the same file are properly synchronized between the [`iostreams`](../standard-library/iostreams-conventions.md) functions and those defined in the C++ Standard Library. Otherwise, synchronization may or may not be guaranteed, but performance may be improved. The function stores *`_Sync`* in the `stdio` sync flag and returns its previous stored value. You can call it reliably only before performing any operations on the standard streams.
Copy file name to clipboardExpand all lines: docs/standard-library/vector.md
+16-17Lines changed: 16 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,6 @@ title: "<vector>"
4
4
ms.date: "11/04/2016"
5
5
f1_keywords: ["<vector>"]
6
6
helpviewer_keywords: ["vector header"]
7
-
ms.assetid: c1431ad8-c0b6-4dbb-89c4-5f651e432d7f
8
7
---
9
8
# `<vector>`
10
9
@@ -13,9 +12,9 @@ Defines the container class template vector and several supporting templates.
13
12
The `vector` is a container that organizes elements of a given type in a linear sequence. It enables fast random access to any element, and dynamic additions and removals to and from the sequence. The `vector` is the preferred container for a sequence when random-access performance is at a premium.
14
13
15
14
> [!NOTE]
16
-
> The \<vector> library also uses the `#include <initializer_list>` statement.
15
+
> The `<vector>` library also uses the `#include <initializer_list>` statement.
17
16
18
-
For more information about the class `vector`, see [vector Class](../standard-library/vector-class.md). For information about the specialization `vector<bool>`, see [vector\<bool> Class](../standard-library/vector-bool-class.md).
17
+
For more information about the class `vector`, see [`vector` Class](../standard-library/vector-class.md). For information about the specialization `vector<bool>`, see [`vector\<bool>` Class](../standard-library/vector-bool-class.md).
19
18
20
19
## Syntax
21
20
@@ -70,16 +69,16 @@ void swap (
70
69
71
70
### Parameters
72
71
73
-
*Type*\
72
+
*`Type`*\
74
73
The template parameter for the type of data stored in the vector.
75
74
76
-
*Allocator*\
75
+
*`Allocator`*\
77
76
The template parameter for the stored allocator object responsible for memory allocation and deallocation.
78
77
79
-
*left*\
78
+
*`left`*\
80
79
The first (left) vector in a compare operation
81
80
82
-
*right*\
81
+
*`right`*\
83
82
The second (right) vector in a compare operation.
84
83
85
84
## Members
@@ -88,31 +87,31 @@ The second (right) vector in a compare operation.
88
87
89
88
|Name|Description|
90
89
|-|-|
91
-
|[operator! =](../standard-library/vector-operators.md#op_neq)|Tests if the vector object on the left side of the operator is not equal to the vector object on the right side.|
92
-
|[operator<](../standard-library/vector-operators.md#op_lt)|Tests if the vector object on the left side of the operator is less than the vector object on the right side.|
93
-
|[operator\<=](../standard-library/vector-operators.md#op_gt_eq)|Tests if the vector object on the left side of the operator is less than or equal to the vector object on the right side.|
94
-
|[operator==](../standard-library/vector-operators.md#op_eq_eq)|Tests if the vector object on the left side of the operator is equal to the vector object on the right side.|
95
-
|[operator>](../standard-library/vector-operators.md#op_gt)|Tests if the vector object on the left side of the operator is greater than the vector object on the right side.|
96
-
|[operator>=](../standard-library/vector-operators.md#op_gt_eq)|Tests if the vector object on the left side of the operator is greater than or equal to the vector object on the right side.|
90
+
|[`operator! =`](../standard-library/vector-operators.md#op_neq)|Tests if the `vector` object on the left side of the operator is not equal to the `vector` object on the right side.|
91
+
|[`operator<`](../standard-library/vector-operators.md#op_lt)|Tests if the `vector` object on the left side of the operator is less than the `vector` object on the right side.|
92
+
|[`operator\<=`](../standard-library/vector-operators.md#op_gt_eq)|Tests if the `vector` object on the left side of the operator is less than or equal to the `vector` object on the right side.|
93
+
|[`operator==`](../standard-library/vector-operators.md#op_eq_eq)|Tests if the `vector` object on the left side of the operator is equal to the `vector` object on the right side.|
94
+
|[`operator>`](../standard-library/vector-operators.md#op_gt)|Tests if the `vector` object on the left side of the operator is greater than the `vector` object on the right side.|
95
+
|[`operator>=`](../standard-library/vector-operators.md#op_gt_eq)|Tests if the `vector` object on the left side of the operator is greater than or equal to the `vector` object on the right side.|
97
96
98
97
### Classes
99
98
100
99
|Name|Description|
101
100
|-|-|
102
-
|[vector Class](../standard-library/vector-class.md)|A class template of sequence containers that arrange elements of a given type in a linear arrangement and allow fast random access to any element.|
101
+
|[`vector Class`](../standard-library/vector-class.md)|A class template of sequence containers that arrange elements of a given type in a linear arrangement and allow fast random access to any element.|
103
102
104
103
### Specializations
105
104
106
105
|Name|Description|
107
106
|-|-|
108
107
|hash|Returns a hash of the vector.|
109
-
|[vector\<bool> Class](../standard-library/vector-bool-class.md)|A full specialization of the class template vector for elements of type **`bool`** with an allocator for the underlying type used by the specialization.|
108
+
|[`vector\<bool> Class`](../standard-library/vector-bool-class.md)|A full specialization of the class template vector for elements of type **`bool`** with an allocator for the underlying type used by the specialization.|
0 commit comments