Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5243

C/C++ • Re: Anyone know why I'm getting this warning about alarm_callback_t?

$
0
0
Also I'm perplexed as to why I don't need "&" to pass the address of the function to add_alarm_in_ms().
You can add the ampersand if you prefer.

It is not necessary, because the absence of parentheses after the name indicates that you are not calling the function yet. The only other way a function can be used in an expression is by taking a pointer to its address.

Statistics: Posted by jojopi — Sun Dec 08, 2024 4:47 pm



Viewing all articles
Browse latest Browse all 5243

Trending Articles