Closed casouri closed 6 years ago
Code:
pcp_ctx_t *pcpCTX = pcp_init(ENABLE_AUTODISCOVERY);
Error:
pcp.c:6:52: error: too few arguments to function call, expected 2, have 1 pcp_ctx_t *pcpCXT = pcp_init(ENABLE_AUTODISCOVERY); ~~~~~~~~ ^
But in pcp.h the second argument is marked optional.
Did I miss something here?
Since C doesn't support default values for arguments, you have to pass 2 arguments. When you don't want to pass socket_vt pointer, just pass NULL. I've updated pcp_init description to include this information.
Code:
Error:
But in pcp.h the second argument is marked optional.
Did I miss something here?