Switching from Multi-Byte to Unicode character sets



Hello,
This compiles OK using Multi-Byte character set,
but when I switch to Unicode I get an error.
char reply[256] = _T("olleh");

I know this will fix the error with the Unicode compile,
wchar_t reply[256] = _T("olleh");
but this causes many other conversion problems in the program.

Is there some other conversion macro that I could use instead of _T(),
instead of having to change from char to a wchar_t?

Thanks,
-JC


.



Relevant Pages

  • Re: disabling UNICODE definition in C++ VS 2005
    ... suggesting more secure-conscious String functions). ... That UNICODE compiled sample of course fails at the first capi function call. ... Recompiling compiles ... PLEASE NOTE the newsgroup SECURE CODE and PASSWORD will be updated at 9:00 ...
    (microsoft.public.vsnet.general)
  • Re: ERROR! LNK2019 unresolved external CSocketAddr::GetAddrInfo (I cant be the only one!!!)
    ... > It compiles fine without the Platform SDK installed. ... there's an article about Unicode and CSocketAddr but that does not apply to this since this is not ... > Regards Mathias ...
    (microsoft.public.win32.programmer.networks)
  • Re: Issue with trying to use wistream
    ... UNICODE and _UNICODE defined already. ... It's an omission in the standard. ... only have constructors taking narrow-character file names. ... The following compiles without error on VC8. ...
    (microsoft.public.vc.stl)
  • Re: Unicode data types
    ... it compiles, it gives me an exception everytime when it reaches the sprintf_s statement and I am not really sure why. ... My knowledge of unicode and these new functions in VS 2005 are still new to me though I thought this would work since the only difference was a size requirement. ... Okay, thanks a lot everyone; you've answered several questions that I had. ...
    (microsoft.public.vc.language)
  • Re: Issue with trying to use wistream
    ... UNICODE and _UNICODE defined already. ... void func(const wstring& strFileName) ... I am using STLPort, and using STL throughout the application, there are ... The following code compiles with the library shipped with VC++ 2003: ...
    (microsoft.public.vc.stl)