Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

MB

L" -macro

This topic is 5357 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

Trying to integrate SAPI I stumbled using the L macro, which changes a char into a wide char. I shall pass a string as: Speak(L"helloWorld", ....) but what if I want to pass a CString a instead? I know it's stupid, but could not find the answer yet. How can I cast CString to wide char string? [edited by - MB on February 21, 2004 8:35:16 AM] [edited by - MB on February 21, 2004 8:35:42 AM]

Share this post


Link to post
Share on other sites
Advertisement
L is not a macro. It signifies that the following string consists of characters that are unsigned shorts. CString will store char''s if _UNICODE is not defined. If _UNICODE is defined, CString will store wchar_t.

You can use std::wstring if you need both types of strings in the same project.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!