C++ assumes header files end in .h so just take that out. Visual C++ probably didn't include .h on any of thier compiler header files.
The rest of the code looks like a textbook example so it should be fine. I'll save the lecture for no args on a console program.
Because you are using Windows, it closes the command window as soon as the program finishes. The correct way to run a command line program is manually open a window navigate to the file location and execute it from the command line. In the start menu of WinXP and later it is usually labeled "Command Prompt" but if you are using something really old like Win98 or earlier it is called a DOS window. Enter help for a command list and further instructions on using help.
The next problem is which version of Visual C++? You could have an incompatibility problem a configuration problem or both. You might want to take a look at how things are configured and do some manual tweaking. Of importance here is whether the compiler knows where the header files are. You can change this in most IDE's. You could also try a re-install with the custom option and watch how it is installed. At the very least, you may have to figure out where the header files are installed.
What operating system? The answer makes a difference to what advice I can give. If you are using a 32 bit operating system, then you have a lot of free options other than Visual C++. You can run any 16 or 32 bit compiler. If you are using a 64 bit operating system, you may not be able to run 16 bit programs without some extra software. Download DOSbox to run 16 bit programs. Since you probably won't be creating any GUI programs, you may want to consider some command line compilers other than VC++. Go to http://cprogramming.com for some more compilers. I'd suggest DJGPP and RHIDE though you may have some fits getting your system configured to run it. The reason for this mess is DJGPP creates 32 bit programs with 16 bit headers. You also have the option of using Linux and doing your work there with gcc and various Linux tools.
Last is a bit of advice. Don't assume you are a programmer after 21 days. I keep a couple of the 21 days type books for reference so I know more or less what is in yours. Once you get through the book, that is just a small beginning because the book is only really teaching you the programming language. You still need to learn how to use the programming language. It all takes months and even years.
Shadow Wolf