-1

So i'm trying to port my friends code that was compiled with GCC to Visual C++.

Picture of what i'm doing and error.

slawekwin
  • 6,270
  • 1
  • 44
  • 57
Roses
  • 1
  • 2
  • 4
    Hi, welcome to SO. Please post an actual code and error snippets instead of screenshots – Idan Jul 29 '16 at 06:04

1 Answers1

0

Your problem lies here:

(void*) &IEngineVGui::GetPanel

The type of &IEngineVGui::GetPanel is int (IEngineVGui::*) (int), which is a member function pointer.

You are trying to convert it to a "regular" pointer type, which is sadly not possible because they are handled completely differently. So MSVC is acting correctly by giving you an error. If your code compiled fine on GCC, it was most likely due to a bug and/or a non-standard extension in that particular version.

Community
  • 1
  • 1
nshct
  • 1,197
  • 9
  • 29