Jump to content
  • Advertisement
Sign in to follow this  
_damN_

Converting TCHAR* to char*?

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

Hi there... I have a function that requires me to convert a paramater to char* like so.. AddItem(m_hDEVICE, D3DDevTypeToString(pA->d3dDevs[d].d3dDevType), &pA->d3dDevs[d]); When i compile i get the error: "error C2664: 'AddItem' : cannot convert parameter 2 from 'TCHAR *' to 'char *'" Does someone have an easy way that i can convert parameter 2 from TCHAR* to char*? Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Most easiest way is to change C++ project settings - set "Character Set" to "Use Multi-Byte Character Set".

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.

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!