回答編集履歴

1

#include を追加

2017/05/02 03:07

投稿

aglkjggg
aglkjggg

スコア769

test CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  ```cpp
4
4
 
5
+ #include <iostream>
6
+
7
+ #include <fstream>
8
+
9
+ #include <string>
10
+
11
+
12
+
5
13
  ifstream ifs("shift-jis.txt");
6
14
 
7
15
  string str((istreambuf_iterator<char>(ifs)), istreambuf_iterator<char>());
@@ -18,6 +26,16 @@
18
26
 
19
27
  ```cpp
20
28
 
29
+ #include <iostream>
30
+
31
+ #include <fstream>
32
+
33
+ #include <string>
34
+
35
+ #include <codecvt>
36
+
37
+
38
+
21
39
  setlocale(LC_ALL, "");
22
40
 
23
41
 
@@ -40,6 +58,16 @@
40
58
 
41
59
  ```cpp
42
60
 
61
+ #include <iostream>
62
+
63
+ #include <fstream>
64
+
65
+ #include <string>
66
+
67
+ #include <codecvt>
68
+
69
+
70
+
43
71
  setlocale(LC_ALL, "");
44
72
 
45
73
 
@@ -62,6 +90,16 @@
62
90
 
63
91
  ```cpp
64
92
 
93
+ #include <iostream>
94
+
95
+ #include <fstream>
96
+
97
+ #include <string>
98
+
99
+ #include <codecvt>
100
+
101
+
102
+
65
103
  setlocale(LC_ALL, "");
66
104
 
67
105
 
@@ -84,6 +122,16 @@
84
122
 
85
123
  ```cpp
86
124
 
125
+ #include <iostream>
126
+
127
+ #include <fstream>
128
+
129
+ #include <string>
130
+
131
+ #include <codecvt>
132
+
133
+
134
+
87
135
  setlocale(LC_ALL, "");
88
136
 
89
137
 
@@ -106,6 +154,16 @@
106
154
 
107
155
  ```cpp
108
156
 
157
+ #include <iostream>
158
+
159
+ #include <fstream>
160
+
161
+ #include <string>
162
+
163
+ #include <codecvt>
164
+
165
+
166
+
109
167
  setlocale(LC_ALL, "");
110
168
 
111
169
 
@@ -128,6 +186,16 @@
128
186
 
129
187
  ```cpp
130
188
 
189
+ #include <iostream>
190
+
191
+ #include <fstream>
192
+
193
+ #include <string>
194
+
195
+ #include <codecvt>
196
+
197
+
198
+
131
199
  setlocale(LC_ALL, "");
132
200
 
133
201