Hi Joe,
Fishman has given you some useful code their to get you going. Note that your own code has several basic syntax errors, which indicate that you're probably still at the "hello world" stage. Do you have a C++ book to refer to? If not, can you lay your hands on one for a little while? It'll help you enormously.
You can also find some (limited but) helpful stuff here:
http://www.robertjacobs.fsnet.co.uk/
Note that if you're using Visual C++ you'll probably have to add:
return 0;
just before the end of the main() function if you use fishman's code, otherwise you might get a compilation error.