Board index » Visual Studio » LPCTSTR vs const char* in Visual C++ 2005
|
Arzan
|
LPCTSTR vs const char* in Visual C++ 2005
Visual Studio119
Greetings! I'm converting programs written on Visual C++.NET 2003 to Visual C++ 2005. While building them with Visual Studio 2005, I got hundreds of errors like: "cannot convert parameter 1 from 'LPCTSTR' to 'const char *'" or "cannot convert parameter 1 from 'const char *' to 'LPCTSTR'". I wrote a simple application to duplicate it (see below): #include "stdafx.h" #include "windows.h" int Work(LPCTSTR s) { return strlen(s); } int _tmain(int argc, _TCHAR* argv[]) { Work("ABCDE"); return 0; } Does anyone know how to solve it? I don't want to add explicit conversion because there are too many places in too many files. Thanks in advance! Tony - |
