回答編集履歴
1
修正
answer
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
```c++
|
2
2
|
string str = "12345678abcdefgh";
|
3
|
-
|
3
|
+
string s[4];
|
4
|
-
|
4
|
+
s[0] = str.substr(0, 4);
|
5
|
-
|
5
|
+
s[1] = str.substr(4, 4);
|
6
|
-
|
6
|
+
s[2] = str.substr(8, 4);
|
7
|
-
|
7
|
+
s[3] = str.substr(12,4);
|
8
|
-
|
8
|
+
cout << s[0] << endl
|
9
|
-
|
9
|
+
<< s[1] << endl
|
10
|
-
|
10
|
+
<< s[2] << endl
|
11
|
-
|
11
|
+
<< s[3];
|
12
12
|
```
|