Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ function pointer variable

// 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);
 
PREVIOUS NEXT
Tagged: #function #pointer #variable
ADD COMMENT
Topic
Name
2+3 =