Function References

后端 未结 5 1393
醉话见心
醉话见心 2020-11-29 01:02

So I was just working with function pointers and I remembered that you could do this:

void Foo()
{
}

int main()
{
    void(& func)() = Foo;

    func();         


        
5条回答
  •  日久生厌
    2020-11-29 01:27

    I've used them in a plug-in system where plug-in DLLs could be loaded/unloaded at run-time. I would look for known symbols in each DLL and cast them to function pointers.

提交回复
热议问题