Problem with strcpy()  
Author Message
Jain1122





PostPosted: Visual C++ General, Problem with strcpy() Top

Hello all,

The following operations giving the error in vc++,visual studio 2005,where as the same thing works fine under vc++6.


char a[16];
void CACTiMCtrl::SetUnicastIP(LPCTSTR lpszNewValue)
{

strcpy(a,lpszNewValue);
SetModifiedFlag();
}

Error is:
error C2664: 'strcpy' : cannot convert parameter 2 from 'LPCTSTR' to 'const char *' e:\actim\actim\actimctrl.cpp 506

How can i solve the problem in visual studio 2005(works fine under vc++6)

Thanks

Adarsh




Visual C++13  
 
 
einaros





PostPosted: Visual C++ General, Problem with strcpy() Top

See http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=849851&SiteID=1, and especially the part marked "resolution".