Sign in to follow this  
TravisMarshall

Extremely Beginner Question

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this