Hello, I am an absolute beginner as far as programming goes and wanted to start teaching myself in a way. I've gone out and starting looking up tutorials on how to get started and bought a beginners guide to game programming. I've started on my first program (much like the hello world program) but I keep getting error code C2664. I downloaded the platform SDK and copied bin, lib, and include files into the C++ folder. Here is my source:
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nShowCmd)
{
MessageBox(NULL, "Starting off small",
"BlackZer0", MB_OK);
}
And now here is the error I keep recieving in the debug box:
------ Build started: Project: HelloWorld, Configuration: Debug Win32 ------
Compiling...
main.cpp
c:\documents and settings\pat eason\my documents\visual studio 2005\projects\helloworld\helloworld\main.cpp(8) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [19]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Build log was saved at "file://c:\Documents and Settings\Pat Eason\My Documents\Visual Studio 2005\Projects\HelloWorld\HelloWorld\Debug\BuildLog.htm"
HelloWorld - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
This is really confusing since, essentially, this is copied directly from that programming book. The disc that came with it has the correct source code, and that wont even compile. Any help would be greatly appreciated.
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nShowCmd)
{
MessageBox(NULL, "Starting off small",
"BlackZer0", MB_OK);
}
And now here is the error I keep recieving in the debug box:
------ Build started: Project: HelloWorld, Configuration: Debug Win32 ------
Compiling...
main.cpp
c:\documents and settings\pat eason\my documents\visual studio 2005\projects\helloworld\helloworld\main.cpp(8) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [19]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Build log was saved at "file://c:\Documents and Settings\Pat Eason\My Documents\Visual Studio 2005\Projects\HelloWorld\HelloWorld\Debug\BuildLog.htm"
HelloWorld - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
This is really confusing since, essentially, this is copied directly from that programming book. The disc that came with it has the correct source code, and that wont even compile. Any help would be greatly appreciated.