First, you posted to the wrong forum. Your not making a game and your not using VB. You do know that there is a C and C++ forum on here at http://forums.vb-world.net/forumdisp...p?s=&forumid=9

Anyway, you program looks fine and I was able to run it on my own system. Assuming that you are using Visual C++; when you created a new project, did you select 'Win32 Application'?

The .c or .cpp shouldn't matter at all.