Answer the question
In order to leave comments, you need to log in
How does the standard describe calling a function by pointer?
Hello.
There was a question concerning a call of function under the pointer. There is this code:
#include "stdio.h"
typedef void (*FUNC)();
void func()
{
printf( "In func()\n" );
}
int main( int argc, char* argv[] )
{
FUNC f = func;
(*f)();
f();
return 0;
}
In func()
In func()
Answer the question
In order to leave comments, you need to log in
Will GCC compile the code correctly?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question