Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c function as paramter

// function ask for void function with int param
void func ( void (*f)(int) );

// void function with int param :)
void print ( int x ) {
  printf("%d
", x);
}

// pass print function to func 
func( print )
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #function #paramter
ADD COMMENT
Topic
Name
5+3 =