Thanks fellas,
the prog still doesn't work without a windows error and a crash so I guess there is more wrong than I thought. The .in file is with the other files all in the same directory. I guess the good news is that it is forcing me to read and understand more in the process.

Didn't know about the code tags but will use them in the future.