0
votes

Currently I am working on a migration project from visual c++ 6.0 to visual studio c++ 2005. And during compilation, I am getting "Undeclared Identifier Error"

code

while(TRUE)
{       sEntry.Format(sActiveMbfs, ixR++);
        sProfile=pApp->GetProfileString(pszSection, sEntry, &afxChNil);
        if(!sProfile.GetLength())
        break;

error

1>c:\xxxx\xxxx\xxxx\xxxx.cpp(887) : error C2065: 'afxChNil' : undeclared identifier

Can anyone help ?

1
Just pass NULL or the last parameter, or omit it entirely (NULL is the default for it).Igor Tandetnik
Hi Igor, I tried with NULL and omitting entire '&afxChNil' , but i didn't work. could you please suggest.Rohit
Define "didn't work". What outcome did you expect, what did you observe, and how do the two differ?Igor Tandetnik

1 Answers

0
votes

According to MSDN, just replacing &afxChNil with either an empty string (_T("")) or NULL should do the trick.