Bonjour, j'obtiens un erreur que je n'arrive pas a résoudre. Voici mon code:
Process.h:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35 #ifndef PROCESS_H #define PROCESS_H #include <vector> #include "tnt.h" struct Element { public: /// Where did we find the varaible in the file scan_location mlocation; /// The key sym_variable mVar; Element(scan_location loc, sym_variable var) { mVar=var; mlocation = loc; } }; class CProcess { private: atom m_srcid_atom; std::vector<Element> m_lstLocation; public: int OnErrorMessage(TNTMSG *msg); int install_callbacks(void); int OnBegin(TNTMSG *msg); int OnIdentifier(TNTMSG *msg); }; #endif
Process.cpp
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45 #include "stdafx.h" #include "Process.h" int CProcess::OnBegin(TNTMSG *msg) { //code return SUCCESS; } int CProcess::OnErrorMessage(TNTMSG *msg) { // code return SUCCESS; } int CProcess::OnIdentifier(TNTMSG *msg) { //code return SUCCESS; } int CProcess::install_callbacks(void) { callback_add(ACTION_BEGIN, OnBegin, OMITTED); ///erreur obtenu : callback_add' : cannot convert parameter 2 from 'int (struct _tntmsg *)' to 'int (__cdecl *)(struct _tntmsg *)' callback_add(ACTION_IDENTIFIER, OnIdentifier, OMITTED);///erreur obtenu : callback_add' : cannot convert parameter 2 from 'int (struct _tntmsg *)' to 'int (__cdecl *)(struct _tntmsg *)' callback_add(ACTION_ERR_MESSAGE, OnErrorMessage, OMITTED);///erreur obtenu : callback_add' : cannot convert parameter 2 from 'int (struct _tntmsg *)' to 'int (__cdecl *)(struct _tntmsg *)' return SUCCESS; } int CProcess::process_initialize(void) { callback_reset(); install_callbacks(); return SUCCESS; } }
Auriez vous une idée de ce que je ne fais pas de correct?
Partager