Skip to content

Instantly share code, notes, and snippets.

@liweinan
Created April 16, 2018 08:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liweinan/8d4402840b633cb1cd2cbdb3dd12794f to your computer and use it in GitHub Desktop.
Save liweinan/8d4402840b633cb1cd2cbdb3dd12794f to your computer and use it in GitHub Desktop.
#include <stdio.h>
void my_int_func(int x)
{
printf( "%d\n", x );
}
int main()
{
void (*foo)(int);
foo = &my_int_func;
foo(42);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment