Any one know what is means by
void Log(int nLevel,LPCTSTR lpszFormat,...)
{
}
May I know what can ... inside the above function refering to?
Printable View
Any one know what is means by
void Log(int nLevel,LPCTSTR lpszFormat,...)
{
}
May I know what can ... inside the above function refering to?
This is the same as printf parameters. Number of parameters is defined by format specifiers in the lpszFormat.
You can use va_start() to initialize variable argument list pointer and then va_arg() to get next argument in variable argument list.
Refer http://msdn.microsoft.com/en-us/libr...d8(VS.71).aspx for example.
Thanks to Alex F.
Also thanks to funwithdolphin for showing me a clear example.Now I know how to use it. Thanks again.