I am trying to develop a function LogMsg with a default argument. It seems that when I try to override the argument in a function call, the default argument value is still used. Does anyone encounter this issue?
My function is below, I am trying set the eventId is ArEventLog. The default argument is the severity:
enum
{
LOG_SEVERITY_SUCCESS=536870912,
LOG_SEVERITY_INFO=1610612736,
LOG_SEVERITY_WARNING=-1610612736,
LOG_SEVERITY_ERROR=-536870912
};
void LogMsg(const char* strMsg, DINT severity=LOG_SEVERITY_WARNING);