Want to write a text file to save log data during app runtime. Grabbed this code from MSDN itself, and it doesnt compile.

HANDLE hFile = CreateFile(_T("C:\\TEMP\\MyFile.txt"),
GENERIC_WRITE, FILE_SHARE_READ,
NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (hFile == INVALID_HANDLE_VALUE)
AfxMessageBox(_T("Couldn't create the file!"));
else
{
CFile myFile(hFile);
static const char sz[] = "Hockey is best!";
myFile.Write(sz, lstrlen(sz));
myFile.Close();
}

This is the error
'lstrlenW' : cannot convert parameter 1 from 'const char [16]' to 'LPCWSTR'

What am I doing wrong?