login about faq

To prove you're not a spammer, email newuser.lgqa@gmail.com with the subject "Account Request" to request an account.

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


asked Jul 22 '11 at 23:35

lunertexcosmo's gravatar image


Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Jul 22 '11 at 23:35

Seen: 1,568 times

Last updated: Jul 22 '11 at 23:35