Extremely Beginner Question

Started by
1 comment, last by TravisMarshall 16 years, 4 months ago
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
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".
thank you SiCrane that was the problem.

This topic is closed to new replies.

Advertisement