The behavior of my code is different in c and c++. 

```
void *(*funcPtr)() = dlsym(some symbol..) ; // (1) works in c but not c++

int (*funcPtr)();
*(void**)(&funcPtr) = dlsym(some symbol..) ; // (2) works in c++

```

I dont understand how the 2nd casting works in c++ while the 1st casting doesnt work in c++. The error message for (1) show is invalid conversion from void\* to void\*() in c++.