回答編集履歴
1
微修正
answer
CHANGED
@@ -8,11 +8,13 @@
|
|
8
8
|
|
9
9
|
```C++
|
10
10
|
#include <stdio.h>
|
11
|
+
|
12
|
+
// ------------------- ここから -----------------------------
|
11
13
|
#include <sstream>
|
12
14
|
#include <string>
|
13
15
|
|
14
16
|
template<typename tArray, typename tStruct, typename tType>
|
15
|
-
char const* output(tArray& iArray, tType tStruct::*iPtr)
|
17
|
+
char const* output(tArray const& iArray, tType tStruct::*iPtr)
|
16
18
|
{
|
17
19
|
std::stringstream ss;
|
18
20
|
for(auto&& i : iArray)
|
@@ -23,6 +25,7 @@
|
|
23
25
|
ret=ss.str();
|
24
26
|
return ret.c_str();
|
25
27
|
}
|
28
|
+
// ------------------- ここまではC++です --------------------
|
26
29
|
|
27
30
|
typedef struct {
|
28
31
|
char c[128];
|