"%Z" parsing gives error in c++ as unhandled exception with access voilation?
<p>The code is as below.</p>

<p>when LogToMyFile("%Z) error raises at _vstprintf and crashes the application. Please help.</p>

<pre><code>void LogToMyFile(LPCTSTR pFormat, ...)
{
    TCHAR   chMsg[2048];
    LPTSTR  lpszStrings[1];
    va_list pArg;

    va_start(pArg, pFormat);
    _vstprintf(chMsg, pFormat, pArg);
    va_end(pArg);

    lpszStrings[0] = chMsg;
}
</code></pre>

<p>Thanks.</p>
