It's unlikely the SaveErrorMsg function is declared correctly as the following takes a reference to a single char as it's argument:
void SaveErrorMsg(char &msg)
{
}
It should probably look like this:
void SaveErrorMsg(const char* msg)
{
}
You would then call it like this:
SaveErrorMsg("End-of-File");
This would probably be even better:
void SaveErrorMsg(const CString& msg)
{
}
void SaveErrorMsg(const std::string& msg)
{
}
void SaveErrorMsg(const std::wstring& msg)
{
}
Best regards
Espen Harlinn