Jump to content
  • Advertisement
Sign in to follow this  
Cornstalks

ANSI Strings in Visual Studio

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

[C++] I just got Visual Studio 2008 Professional Edition, and I'm trying to figure out how to use ANSI strings. I know that to make an ANSI string I don't add the 'L' prefix to a string, but I'm just wondering, is there a way to make it so my project is using ANSI strings instead of UNICODE strings by default (so all the windows functions take ANSI strings instead of UNICODE strings)?

Share this post


Link to post
Share on other sites
Advertisement
Project properties->Character Set->Use Mutli-Byte Character Set.

Windows API functions are defines which will call either a wide or narrow version based on if UNICODE is defined.

Share this post


Link to post
Share on other sites
hi,

first step is to go into the properties for your project and goto
the "Configuration Properties"->"General" and change the "Character Set" to from "Use Unicode Character Set" to "Multi-Byte Character Set"

Peter

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!