P
Pelle Beckman
Are there such a thing as function References ?
I've done some function Pointer stuff
class MyVariousStuff {
public:
typedef void (*MyFuncPtr)(void*);
SetFuncPtr (MyFuncPtr handle) { m_MyFunc = handle; }
CallFuncPtr () { if (!m_myFunc) return -1; m_myFunc () };
private:
MyFuncPtr m_myFunc;
};
Are there such as thing as function references?
If there are, would thay be preferred in
a situation like this? And how does one use them?
Thanks.
-- Pelle
I've done some function Pointer stuff
class MyVariousStuff {
public:
typedef void (*MyFuncPtr)(void*);
SetFuncPtr (MyFuncPtr handle) { m_MyFunc = handle; }
CallFuncPtr () { if (!m_myFunc) return -1; m_myFunc () };
private:
MyFuncPtr m_myFunc;
};
Are there such as thing as function references?
If there are, would thay be preferred in
a situation like this? And how does one use them?
Thanks.
-- Pelle