![]() |
definition of FUNCPTR
Hello, I am looking at the WPIlib code and have a question
in task.h line 39 I found the variable type 'FUNCPTR' and I didn't found the definition of it in the project, do you know what is the definition of it? thanks a lot, team 1937. |
Re: definition of FUNCPTR
I am not certain which file it is defined in but what it is is a function pointer. It allows you to pass around a reference to functions of the same signature (same return type and parameter types). Function pointers are often used for callbacks where you will provide some function a pointer to a function they should call when some event happens. Wikipedia has a pretty good overview in their Function pointer article.
|
Re: definition of FUNCPTR
Hello, I read what you wrote and I have a question
How can I know the return type of the function and the type of the function's arguments? thank you, Team 1937 |
Re: definition of FUNCPTR
Code:
typedef int (*FUNCPTR)(...); |
Re: definition of FUNCPTR
Soo... a function pointer holds the address of a function, it's arguments and return type?
|
Re: definition of FUNCPTR
Quote:
|
Re: definition of FUNCPTR
Quote:
|
| All times are GMT -5. The time now is 17:57. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi