Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ define function pointer

// Here's a macro I use to define a type.
// You're welcome to use it, but I'll also show how the type is defined.
#define d_typedef_func_ty(return_z, name, ...) typedef return_z (*name)(__VA_ARGS__);
d_typedef_func_ty(int, int_2i_f, int, int); // creates a int(*)(int, int) function pointer
// which is equivelant to the following:
typedef int(*int_2i_f)(int, int);
Source by www.cplusplus.com #
 
PREVIOUS NEXT
Tagged: #define #function #pointer
ADD COMMENT
Topic
Name
9+2 =