I have a situation where in I want one of the parameters of function to be optional. I wanted to know how I can achieve it..?
int mapgw_cm_trace(int trapLog, char *pcMsgId, ...)
I want traplog parameter to be optional.
Or the otherway of looking at this is that, I set this parameter to a default value(say 1) if this parameter is not sent in the function call...else use the vaLue sent in the function call. Is it possible to achieve this..? I do not want to use va_args ()
do not want to use va_args- then why do you have...in your function's declaration? Or it just shows, that there are other irrelevant parameters (but fixed number)?