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
Returns a stream associated with one end of the created pipe. The other end of the pipe is associated with the spawned command's standard input or standard output. The functions return **NULL** on an error. If the error is an invalid parameter, such as if *command* or *mode* is a null pointer, or *mode* is not a valid mode, **errno** is set to **EINVAL**. See the Remarks section for valid modes.
44
+
Returns a stream associated with one end of the created pipe. The other end of the pipe is associated with the spawned command's standard input or standard output. The functions return **NULL** on an error. If the error is caused by an invalid parameter, **errno** is set to **EINVAL**. See the Remarks section for valid modes.
43
45
44
46
For information about these and other error codes, see [_doserrno, errno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md).
45
47
46
48
## Remarks
47
49
48
-
The **_popen** function creates a pipe and asynchronously executes a spawned copy of the command processor with the specified string *command*. The character string *mode* specifies the type of access requested, as follows.
50
+
The **_popen** function creates a pipe. It then asynchronously executes a spawned copy of the command processor, and uses *command* as the command line. The character string *mode* specifies the type of access requested, as follows.
49
51
50
52
|Access mode|Description|
51
53
|-|-|
@@ -107,7 +109,7 @@ int main( void )
107
109
108
110
while(fgets(psBuffer, 128, pPipe))
109
111
{
110
-
printf(psBuffer);
112
+
puts(psBuffer);
111
113
}
112
114
113
115
/* Close pipe and print return value of pPipe. */
@@ -122,9 +124,7 @@ int main( void )
122
124
}
123
125
```
124
126
125
-
### Sample Output
126
-
127
-
This output assumes that there is only one file in the current directory with a .c file name extension.
127
+
This output assumes there's only one file in the current directory that has a `.c` file name extension.
128
128
129
129
```Output
130
130
Volume in drive C is CDRIVE
@@ -141,6 +141,6 @@ Process returned 0
141
141
142
142
## See also
143
143
144
-
[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)<br/>
145
-
[_pclose](pclose.md)<br/>
146
-
[_pipe](pipe.md)<br/>
144
+
[Process and environment control](../../c-runtime-library/process-and-environment-control.md)\
Provides access to an array of elements in which each member is of the specified type.
11
12
@@ -18,9 +19,8 @@ class initializer_list
18
19
19
20
### Parameters
20
21
21
-
|Parameter|Description|
22
-
|---------------|-----------------|
23
-
|*Type*|The element data type to be stored in the `initializer_list`.|
22
+
*Type*\
23
+
The element data type to be stored in the `initializer_list`.
24
24
25
25
## Remarks
26
26
@@ -30,24 +30,24 @@ An `initializer_list` can be constructed using a braced initializer list:
30
30
initializer_list<int> i1{ 1, 2, 3, 4 };
31
31
```
32
32
33
-
The compiler transforms braced initializer lists with homogeneous elements into an `initializer_list` whenever the function signature requires an `initializer_list`. For more details on using `initializer_list`, see [Uniform Initialization and Delegating Constructors](../cpp/uniform-initialization-and-delegating-constructors.md)
33
+
The compiler transforms braced initializer lists with homogeneous elements into an `initializer_list` whenever the function signature requires an `initializer_list`. For more information about using `initializer_list`, see [Uniform initialization and delegating constructors](../cpp/uniform-initialization-and-delegating-constructors.md)
34
34
35
35
### Constructors
36
36
37
37
|Constructor|Description|
38
38
|-|-|
39
-
|[initializer_list](../standard-library/forward-list-class.md#forward_list)|Constructs an object of type `initializer_list`.|
39
+
|[initializer_list](#initializer_list)|Constructs an object of type `initializer_list`.|
40
40
41
41
### Typedefs
42
42
43
43
|Type name|Description|
44
44
|-|-|
45
-
|value_type|The type of the elements in the `initializer_list`.|
46
-
|reference|A type that provides a reference to an element in the `initializer_list`.|
47
-
|const_reference|A type that provides a constant reference to an element in the `initializer_list`.|
48
-
|size_type|A type that represents the number of elements in the `initializer_list`.|
49
-
|iterator|A type that provides an iterator for the `initializer_list`.|
50
-
|const_iterator|A type that provides a constant iterator for the `initializer_list`.|
45
+
|`value_type`|The type of the elements in the `initializer_list`.|
46
+
|`reference`|A type that provides a reference to an element in the `initializer_list`.|
47
+
|`const_reference`|A type that provides a constant reference to an element in the `initializer_list`.|
48
+
|`size_type`|A type that represents the number of elements in the `initializer_list`.|
49
+
|`iterator`|A type that provides an iterator for the `initializer_list`.|
50
+
|`const_iterator`|A type that provides a constant iterator for the `initializer_list`.|
51
51
52
52
### Member functions
53
53
@@ -71,12 +71,10 @@ Returns a pointer to the first element in an `initializer_list`.
|*First*|The position of the first element in the range of elements to be copied.|
106
-
|*Last*|The position of the first element beyond the range of elements to be copied.|
101
+
*First*\
102
+
The position of the first element in the range of elements to be copied.
103
+
104
+
*Last*\
105
+
The position of the first element beyond the range of elements to be copied.
107
106
108
107
### Remarks
109
108
110
-
An `initializer_list` is based on an array of objects of the specified type. Copying an `initializer_list` creates a second instance of a list pointing to the same objects; the underlying objects are not copied.
109
+
An `initializer_list` is based on an array of objects of the specified type. Copying an `initializer_list` creates a second instance of a list pointing to the same objects; the underlying objects aren't copied.
0 commit comments