why is this legal, c++ typedef func
- by acidzombie24
i did this in msvc 2005.
typedef void (*cleanup_t)();
void func(cleanup_t clean)
{
cleanup_t();
}
Why does this compile? and not give me a warning? ok, it gave me a unreferenced formal parameter warning but originally i did this when clean was in a class no there was no unreferenced formal parameter when this code gave me problems.
What is cleanup_t(); really doing and what is the point? now for laughs i tried int() and that worked also.