回答編集履歴
1
修正
test
CHANGED
@@ -2,22 +2,22 @@
|
|
2
2
|
|
3
3
|
string str = "12345678abcdefgh";
|
4
4
|
|
5
|
-
|
5
|
+
string s[4];
|
6
6
|
|
7
|
-
|
7
|
+
s[0] = str.substr(0, 4);
|
8
8
|
|
9
|
-
|
9
|
+
s[1] = str.substr(4, 4);
|
10
10
|
|
11
|
-
|
11
|
+
s[2] = str.substr(8, 4);
|
12
12
|
|
13
|
-
|
13
|
+
s[3] = str.substr(12,4);
|
14
14
|
|
15
|
-
|
15
|
+
cout << s[0] << endl
|
16
16
|
|
17
|
-
|
17
|
+
<< s[1] << endl
|
18
18
|
|
19
|
-
|
19
|
+
<< s[2] << endl
|
20
20
|
|
21
|
-
|
21
|
+
<< s[3];
|
22
22
|
|
23
23
|
```
|