質問編集履歴
1
不足情報を補足
title
CHANGED
File without changes
|
body
CHANGED
@@ -39,4 +39,51 @@
|
|
39
39
|
出来ればこういうエラーになってしまう原因なども分かりましたら教えていただけると嬉しいです。
|
40
40
|
関数とクラス関数は似ているようで別物なのでしょうか
|
41
41
|
|
42
|
-
以上、よろしくお願いいたします
|
42
|
+
以上、よろしくお願いいたします
|
43
|
+
|
44
|
+
----------追記--------------
|
45
|
+
クラス宣言
|
46
|
+
```C++
|
47
|
+
//ファイル名:クラス名.h
|
48
|
+
namespace 名前
|
49
|
+
{
|
50
|
+
|
51
|
+
//----------------------------------------------------------------------------
|
52
|
+
// クラス宣言.
|
53
|
+
//----------------------------------------------------------------------------
|
54
|
+
class クラス名
|
55
|
+
{
|
56
|
+
//----------------------------------------------------------------------------
|
57
|
+
// 定数定義.
|
58
|
+
//----------------------------------------------------------------------------
|
59
|
+
|
60
|
+
|
61
|
+
//----------------------------------------------------------------------------
|
62
|
+
// メンバ関数.
|
63
|
+
//----------------------------------------------------------------------------
|
64
|
+
// 公開メンバ関数.
|
65
|
+
public:
|
66
|
+
|
67
|
+
|
68
|
+
// 非公開メンバ関数.
|
69
|
+
private:
|
70
|
+
int is_event_device(const struct dirent *dir)
|
71
|
+
|
72
|
+
//----------------------------------------------------------------------------
|
73
|
+
// メンバ変数.
|
74
|
+
//----------------------------------------------------------------------------
|
75
|
+
// 非公開メンバ変数.
|
76
|
+
private:
|
77
|
+
|
78
|
+
};
|
79
|
+
|
80
|
+
} // namespace 名前
|
81
|
+
```
|
82
|
+
|
83
|
+
エラー文は
|
84
|
+
「cannot convert '名前::クラス名::is_event_device' from type 'int (名前::クラス名::)(const dirent*) to type 'int (*)(const dirent*)'」
|
85
|
+
です
|
86
|
+
|
87
|
+
エラーが出ているのは
|
88
|
+
ndev = scandir("/dev/input", &namelist, is_event_device, alphasort);
|
89
|
+
のところです
|