FAQ:    Where should I save the input file for my program?

            Where is the output file after I've run my program?



I'll assume you're using Visual C++ to compile and run your program.  In that case, your source code file (say payroll.cpp) is in some folder, say MyProject.  The executable is then in a subfolder of that, called Debug:

MyProject        // payroll.cpp is here
    |
    +--- Debug   // payroll.exe is here

If you run the program from within Visual C++ (using the menus or toolbar), then the input file should be in the same folder as the source code file (MyProject in this case).  The output file will be created in the same folder as the input file.

Note for command-line fans:  if you run the program from the DOS command line, then you should have the input file, workers.dat, in the same folder as the executable (Debug in this case).

That seems a bit screwy, but that's the way Visual works.