Re: Weird behavior / bug(?) with VC++ Studio 2005 (Beta 2)
- From: "David McCabe" <david.mccabe@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 16 Jun 2005 10:12:49 +0100
You have UNICODE defined. When you compile with Unicode, Windows API
functions that take strings resolve to their Unicode variants, which have a
'W' suffix. They then require Unicode strings as parameters.
Either change your strings to be Unicode strings (constants should have an L
prefix), or change your compile options to use "multi-byte character sets".
--
David
"David F" <David-White@xxxxxxxxxxxxx> wrote in message
news:uRns%23ElcFHA.2696@xxxxxxxxxxxxxxxxxxxxxxx
>I am getting the following 2 error messages from the compiler:
>
> f:\development\projects 2005\fc\fc.cpp(296) : error C2664: 'wsprintfW' :
> cannot convert parameter 1 from 'LPSTR' to 'LPWSTR'
>
> Types pointed to are unrelated; conversion requires
> reinterpret_cast, C-style cast or function-style cast
>
>
>
> f:\development\projects 2005\fc\fc.cpp(373) : error C2664:
> 'FindFirstFileW'
> : cannot convert parameter 1 from 'const char *' to 'LPCWSTR'
>
> Types pointed to are unrelated; conversion requires
> reinterpret_cast, C-style cast or function-style cast
>
>
> My code does not have "wsprintfW" & "FindFirstFileW" !
> What I do have is "wsprintf" & "FindFirstFile".
>
> Anybody heard about such behavior of the C++ compiler?
>
> Thanks,
> David
>
>
.
- References:
- Weird behavior / bug(?) with VC++ Studio 2005 (Beta 2)
- From: David F
- Weird behavior / bug(?) with VC++ Studio 2005 (Beta 2)
- Prev by Date: Sleep() header file...
- Next by Date: Re: Weird behavior / bug(?) with VC++ Studio 2005 (Beta 2)
- Previous by thread: Re: Weird behavior / bug(?) with VC++ Studio 2005 (Beta 2)
- Next by thread: Re: Weird behavior / bug(?) with VC++ Studio 2005 (Beta 2)
- Index(es):
Relevant Pages
|