C pass pointer as argument in function

Zack

I came across the following code:

int H3I_hook(int (*progress_fn)(int*), int *id)
{
...
}

I don't understand the purpose of (int*) at the end of the first argument?

sjsam

Demystifying:

int (*progress_fn)(int*)

it can be interpreted like below:

int (*progress_fn)(int*)
 ^       ^          ^
 |       |          |___________ pointer to integer as argument
 |       |
 |     pointer to any function that has V and takes ^
 |
 |__________________________return type an integer

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Cannot pass struct pointer as function argument in C

From Dev

when to pass a pointer argument to a function

From Dev

Pass pointer to member function as argument with C++11

From Java

Pass pointer or PointerByReference in JNA for pointer argument in C

From Dev

How to pass a pointer to a static function as argument to another static function from inside a static function in C++

From Dev

How to pass a generic argument to a function pointer?

From Dev

How to pass vector as function argument to pointer

From Dev

what is the right way to pass a pointer as an argument to a function?

From Dev

c++ pointer to a function as argument

From Dev

c++ pointer to a function as argument

From Dev

passing function pointer in c with a pointer argument

From Java

Is it possible to pass a pointer to an operator as an argument like a pointer to a function?

From Dev

Pass char pointer to function in C

From Dev

C# pass function as argument

From Dev

C# pass function as argument

From Dev

When to pass a pointer to pointer as argument to functions in C++?

From Dev

How to pass function pointer that has arguments as an argument of another function?

From Dev

void ** pointer in function argument c++

From Dev

C++ Function Pointer as Argument and Classes?

From Dev

Passing a pointer to a char array as an argument to a function - C

From Dev

function with a struct array pointer as an argument, C language

From Dev

c struct passing itself as an argument into a pointer function

From Dev

Passing a pointer to a char array as an argument to a function - C

From Dev

c ++ Class Method Pointer as Function Argument

From Dev

C Ways To Pass Function As Argument To Function

From Dev

How to pass a float array to the function that has unsigned char pointer as an argument?

From Dev

Pass pointer to data as argument to function expecting two-dimensional array

From Dev

How to pass a pointer to a function argument of type fixed size array?

From Dev

Pass a function-pointer name to C Preprocessor

Related Related

  1. 1

    Cannot pass struct pointer as function argument in C

  2. 2

    when to pass a pointer argument to a function

  3. 3

    Pass pointer to member function as argument with C++11

  4. 4

    Pass pointer or PointerByReference in JNA for pointer argument in C

  5. 5

    How to pass a pointer to a static function as argument to another static function from inside a static function in C++

  6. 6

    How to pass a generic argument to a function pointer?

  7. 7

    How to pass vector as function argument to pointer

  8. 8

    what is the right way to pass a pointer as an argument to a function?

  9. 9

    c++ pointer to a function as argument

  10. 10

    c++ pointer to a function as argument

  11. 11

    passing function pointer in c with a pointer argument

  12. 12

    Is it possible to pass a pointer to an operator as an argument like a pointer to a function?

  13. 13

    Pass char pointer to function in C

  14. 14

    C# pass function as argument

  15. 15

    C# pass function as argument

  16. 16

    When to pass a pointer to pointer as argument to functions in C++?

  17. 17

    How to pass function pointer that has arguments as an argument of another function?

  18. 18

    void ** pointer in function argument c++

  19. 19

    C++ Function Pointer as Argument and Classes?

  20. 20

    Passing a pointer to a char array as an argument to a function - C

  21. 21

    function with a struct array pointer as an argument, C language

  22. 22

    c struct passing itself as an argument into a pointer function

  23. 23

    Passing a pointer to a char array as an argument to a function - C

  24. 24

    c ++ Class Method Pointer as Function Argument

  25. 25

    C Ways To Pass Function As Argument To Function

  26. 26

    How to pass a float array to the function that has unsigned char pointer as an argument?

  27. 27

    Pass pointer to data as argument to function expecting two-dimensional array

  28. 28

    How to pass a pointer to a function argument of type fixed size array?

  29. 29

    Pass a function-pointer name to C Preprocessor

HotTag

Archive