Board index » Visual Studio » error C2440: 'initializing' : cannot convert from 'char [20]' to 'const unsigned short *'

error C2440: 'initializing' : cannot convert from 'char [20]' to 'const unsigned short *'

Visual Studio73
error C2440: 'initializing' : cannot convert from 'char [20]' to 'const

unsigned short *';



i am geting that error becuse of the following statement.



DECLARE_WND_CLASS("Koti Window");



can you please help me , what is the remedy or how to solve that problem



regards,

koti


-
 

Re:error C2440: 'initializing' : cannot convert from 'char [20]' to 'const unsigned short *'

Quote
error C2440: 'initializing' : cannot convert from 'char [20]' to 'const

unsigned short *';



It appears to be a Unicode/Non-Unicode mismatch.



Quote
i am geting that error becuse of the following statement.



DECLARE_WND_CLASS("Koti Window");



Have you tried:



DECLARE_WND_CLASS(L"Koti Window");



Dave

--

MVP VC++ FAQ: www.mvps.org/vcfaq">www.mvps.org/vcfaq

-

Re:error C2440: 'initializing' : cannot convert from 'char [20]' to 'const unsigned short *'

yes, i have tried but it gives so many errors , please tell me another

solution

"David Lowndes" <davidl@example.invalid>wrote in message

Quote
>error C2440: 'initializing' : cannot convert from 'char [20]' to 'const

>unsigned short *';



It appears to be a Unicode/Non-Unicode mismatch.



>i am geting that error becuse of the following statement.

>

>DECLARE_WND_CLASS("Koti Window");



Have you tried:



DECLARE_WND_CLASS(L"Koti Window");



Dave

--

MVP VC++ FAQ: www.mvps.org/vcfaq">www.mvps.org/vcfaq





-

Re:error C2440: 'initializing' : cannot convert from 'char [20]' to 'const unsigned short *'



"koti" <rkr.koti@gmail.com>skrev i meddelandet

Quote
yes, i have tried but it gives so many errors , please tell me another

solution



Have you tried the option "Treat wchar_t as Built-in Type", /Zc:wchar_t

?



If that is not chosen, wchar_t is just a typedef for unsigned short.





Bo Persson









Quote
"David Lowndes" <davidl@example.invalid>wrote in message

news:l6m3019rnke30uuslpsmjcgu8cdpjjrivk@4ax.com...

>>error C2440: 'initializing' : cannot convert from 'char [20]' to

>>'const

>>unsigned short *';

>

>It appears to be a Unicode/Non-Unicode mismatch.

>

>>i am geting that error becuse of the following statement.

>>

>>DECLARE_WND_CLASS("Koti Window");

>

>Have you tried:

>

>DECLARE_WND_CLASS(L"Koti Window");

>

>Dave

>--

>MVP VC++ FAQ: www.mvps.org/vcfaq">www.mvps.org/vcfaq









-

Re:error C2440: 'initializing' : cannot convert from 'char [20]' to 'const unsigned short *'

Quote
>>error C2440: 'initializing' : cannot convert from 'char [20]' to 'const

>>unsigned short *';

>

>It appears to be a Unicode/Non-Unicode mismatch.

>Have you tried:

>

>DECLARE_WND_CLASS(L"Koti Window");



yes, i have tried but it gives so many errors , please tell me another

solution



Pray.



Seriously, I can't think what else the problem could be. You need to

tell us some more. Are you building a Unicode project?



Dave

-

Re:error C2440: 'initializing' : cannot convert from 'char [20]' to 'const unsigned short *'

Have you tried:



DECLARE_WND_CLASS(_T("Koti Window"));





AliR



"koti" <rkr.koti@gmail.com>wrote in message

Quote
error C2440: 'initializing' : cannot convert from 'char [20]' to 'const

unsigned short *';



i am geting that error becuse of the following statement.



DECLARE_WND_CLASS("Koti Window");



can you please help me , what is the remedy or how to solve that problem



regards,

koti









-