Code from visual studio 7.1 don't want to work on visual studio 2008
I've got an old project writetd in vc++ on VS 7.1. When I opened it on Visual Studio 2008 it was correctly converted and worked. Now i needed to use a part of this old code in the new project created on VS2008. Everything work exepct a part of old code:
int CDGabinetDlg::DefineGrammar(const char* fn)
{
int rc;
SM_MSG reply;
TCHAR lpBuffer[256];
GetCurrentDirectory(256, lpBuffer);
string filename(lpBuffer);
filename+="\\";
filename+=fn;
return rc;
}
I've get an error in this part:
string filename(lpBuffer);
This is an error what i get.
error C2664: 'std::basic_string::basic_string(const std::allocator &http://www.barakasoft.com/script/For...miley_wink.gif' : cannot convert parameter 1 from 'TCHAR [256]' to 'const std::allocator