Jump to content
  • Advertisement
Sign in to follow this  
kernkraft

C++ wchar_t problem

This topic is 5476 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This is very stupid but I don't understand why this won't work: typedef wchar_t Char ... function(const Char cCharacter=L" "); The compiler gives me an error, saying that it can't convert from wchar_t to Char even though they're the same thing. error C2440: 'default argument' : cannot convert from 'const wchar_t [2]' to 'const System::Char' There is no context in which this conversion is possible Anyone?

Share this post


Link to post
Share on other sites
Advertisement
You're effectively trying to convert from wchar_t[2] (you're passing a string, not a character) to wchar_t. This you cannot do. You probably want something of the general format L'L', but having never worked with wide characters, I honestly don't know what goes inside the quotes.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!