E
enzo
could anyone explain me why this compiles but doesn't work?
void foo()
{
cout << "Hallo" << endl;
}
class test
{
public:
test(void(*p_f)())
: m_f(p_f)
{
}
void
call()
{
*m_f;
}
private:
void
(*m_f)();
};
int main()
{
test a( &foo );
a.call();
return -1;
}
thanks
void foo()
{
cout << "Hallo" << endl;
}
class test
{
public:
test(void(*p_f)())
: m_f(p_f)
{
}
void
call()
{
*m_f;
}
private:
void
(*m_f)();
};
int main()
{
test a( &foo );
a.call();
return -1;
}
thanks