I'm wondering what is the proper way to point at an overloaded function. Is it correct to cast the function to the proper type?
#include <iostream>
int double_it(int x)
{
return x * 2;
}
int double_it(int x, int y)
{
return (x + y) * 2;
}
int main(int argc, char**argv)
{
void *myfunc = (void*)(int(*)(int))double_it;
return 0;
}