error C2440: 'return' : cannot convert from 'const char *' to 'const unsigned short *' Types pointed

A

Abhijit Bhadra

Hi ,
I was trying to build my project in VC with latest Service Packs but
got this error .

C:\Program Files\Microsoft Visual
Studio\VC98\ATL\INCLUDE\atlconv.h(125) : error C2440: 'return' :
cannot convert from 'const char *' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires
reinterpret_cast, C-style cast or function-style cast

I am using some ATL functionality ( String conversion)
In Preprocessor setting I have made UNICODE and _UNICODE , but no
change in error .

Any help is highly solicited .

Thanks,
Abhijit
 
S

Sharad Kala

Abhijit Bhadra said:
Hi ,
I was trying to build my project in VC with latest Service Packs but
got this error .

C:\Program Files\Microsoft Visual
Studio\VC98\ATL\INCLUDE\atlconv.h(125) : error C2440: 'return' :
cannot convert from 'const char *' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires
reinterpret_cast, C-style cast or function-style cast

I am using some ATL functionality ( String conversion)
In Preprocessor setting I have made UNICODE and _UNICODE , but no
change in error .

You have to post some code to get better replies. If it has a lot of
non-Standard stuff then try the family of newsgroups.

Sharad
 
R

Ron Natalie

Abhijit said:
Hi ,
I was trying to build my project in VC with latest Service Packs but
got this error .
unsigned short is a goofup on Microsoft's part because wchar_t isn't
a distinct type there. When you seem char vs. unsigned short issues,
you've screwed up a char vs. wchar_t somewhere.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top