VC6.0下语句:
BOOL CMy3DSLoaderView::OpenFile(LPCTSTR lpszPathName)
{
char* file = new char[strlen(lpszPathName)];
strcpy(file, lpszPathName); //file内容被正确传递
...
}
VS下函数内容我修改为:
{
char* file = new char[strlen((char*)lpszPathName)];
strcpy(file, (const char*)lpszPathName); //file内容不正确
...
}
该如何修改,求解!