I would like to pass the function "wifi_init()" (that is in a header file) as an argument from Check(wifi_init());
Could someone please assist me with the correct syntax. That is what I have
void Check(void(*callback)())
{
Status = *callback;
}
void init()
{
Check(wifi_init());
}
wifi_init() is defined in another header file as void wifi_init(void);
Calling wifi_init(); in set up or loop works fine but not sure how to pass it..
Thanks!
Thank you for your feedback and I do apologize for not using tagged code.
I fixed the error by passing the function as int and not including the * or ();
Thank you!