|
OK, so I recently got a book on game designing with C++. And I'm on the edge of screaming into a pillow and breaking my computer with a sledge hammer. Visual Studio is making no sense what so ever. The book uses 2008. I use 2010. So there's like a total difference between them. I've been frustratingly working my way through it with many Google searches, unhelpful YouTube videos, and unorganized help pages from Microsoft. So let me explain what my problem is as of now: I am working on a basic program that the book gives me in order to show me how C++ can create Windows programs. I have the following lines of code: // Beginning Game Programming, 3rd Edition // Chapter 1 - HelloWorld program (hash tag) include <windows.h> int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR 1pCmdLine, int nShowCmd) { MessageBox (NULL, "Motoko Kusangagi has hacked your system!", "Public Security Section 9", MB_OK | MB_ICONEXCLAMATION); } I may or may have not typed it up correctly but the problem doesn't seem to be the code. Every time I try to compile and run it with F5 I get an error. I kept reading and it said I was supposed to get an error and I had to disable the unicode errors. OK, done. I pressed F5 once more and I get an error once more. It says something about a .exe. The book I have says NOTHING about creating a .exe. The book I am using is "Beginning Game Programming Third Edition" by Johnathan S. Harbor. So does anyone have any advice on how to create an exe with visual studio c++ 2010. Keep in mind this IS NOT VISUAL BASIC so there is no build window to build and compile an exe. And there is also an error when it compiles as well. Thanks everybody :) ~James |
