|
-
November 27th, 2001, 08:19 AM
#1
Function Pointers that Won't compile
Help my class won't complile...
typedef void (* TestFunc)();
typedef std::map<int, TestFunc > FunctionMap ;
class CMyClass
{
public:
FunctionMap m_Map ;
COracleObjectFactory()
{
m_FuncMap[1] = TestFunction; // Errors
m_FuncMap[2] = TestFunction2; // Errors
}
void TestFunction()
{
// Some Instructions
}
void TestFunction2()
{
// Some Instructions
}
} ;
I'm getting the following error
error C2440: '=' : cannot convert from 'void (__thiscall CMyClass::*)(void)' to 'void (__cdecl *)(void)'
There is no context in which this conversion is possible.
All help grateful accepted... 
thanks in advance
Martin
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|