Jump to content
  • Advertisement
Sign in to follow this  
TravisMarshall

Extremely Beginner Question

This topic is 3889 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 everyone, I just started a new book, Beginning Game Programming 2nd Edition and I am trying to get Microsoft Visual C++ 2008 working on my computer. My C drive is an annoyance because it is almost always full. Luckily one of my father's tech experts is coming to expand the harddrive and give it more space. But because it was full I installed Visual on my E drive. But the C drive is the default so my Visual files are located in two places: C:\Documents and Settings\owner\My Documents\Visual Studio 2008 and E:\Program Files\Microsoft Visual Studio 9.0 now I don't know if having them located in two separate harddrives is a problem but I think it is because the easiest of examples in my book will not compile. I get this error: 1>------ Build started: Project: HelloWorld, Configuration: Debug Win32 ------ 1>Compiling... 1>main.cpp 1>c:\documents and settings\owner\my documents\visual studio 2008\projects\helloworld\helloworld\main.cpp(14) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [40]' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>Build log was saved at "file://c:\Documents and Settings\owner\My Documents\Visual Studio 2008\Projects\HelloWorld\HelloWorld\Debug\BuildLog.htm" 1>HelloWorld - 1 error(s), 0 warning(s) I may seem like a total beginner but I don't know if this error message has to do with my locations or not but I'd like to get Visual to work so I can successfully use this book. -Travis

Share this post


Link to post
Share on other sites
Advertisement
It sounds like Unicode is enabled for your project, and the sample code you're using doesn't use Unicode. Go to project settings, General/Character Set and change "Use Unicode 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!