質問編集履歴
1
不足情報を補足
test
CHANGED
File without changes
|
test
CHANGED
@@ -81,3 +81,97 @@
|
|
81
81
|
|
82
82
|
|
83
83
|
以上、よろしくお願いいたします
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
----------追記--------------
|
88
|
+
|
89
|
+
クラス宣言
|
90
|
+
|
91
|
+
```C++
|
92
|
+
|
93
|
+
//ファイル名:クラス名.h
|
94
|
+
|
95
|
+
namespace 名前
|
96
|
+
|
97
|
+
{
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
//----------------------------------------------------------------------------
|
102
|
+
|
103
|
+
// クラス宣言.
|
104
|
+
|
105
|
+
//----------------------------------------------------------------------------
|
106
|
+
|
107
|
+
class クラス名
|
108
|
+
|
109
|
+
{
|
110
|
+
|
111
|
+
//----------------------------------------------------------------------------
|
112
|
+
|
113
|
+
// 定数定義.
|
114
|
+
|
115
|
+
//----------------------------------------------------------------------------
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
//----------------------------------------------------------------------------
|
122
|
+
|
123
|
+
// メンバ関数.
|
124
|
+
|
125
|
+
//----------------------------------------------------------------------------
|
126
|
+
|
127
|
+
// 公開メンバ関数.
|
128
|
+
|
129
|
+
public:
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
// 非公開メンバ関数.
|
136
|
+
|
137
|
+
private:
|
138
|
+
|
139
|
+
int is_event_device(const struct dirent *dir)
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
//----------------------------------------------------------------------------
|
144
|
+
|
145
|
+
// メンバ変数.
|
146
|
+
|
147
|
+
//----------------------------------------------------------------------------
|
148
|
+
|
149
|
+
// 非公開メンバ変数.
|
150
|
+
|
151
|
+
private:
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
};
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
} // namespace 名前
|
160
|
+
|
161
|
+
```
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
エラー文は
|
166
|
+
|
167
|
+
「cannot convert '名前::クラス名::is_event_device' from type 'int (名前::クラス名::)(const dirent*) to type 'int (*)(const dirent*)'」
|
168
|
+
|
169
|
+
です
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
エラーが出ているのは
|
174
|
+
|
175
|
+
ndev = scandir("/dev/input", &namelist, is_event_device, alphasort);
|
176
|
+
|
177
|
+
のところです
|