I was trying to get my program to work the following way from the terminal (command prompt):
a.out 20 < document.doc
where the value "20" (or whatever is typed) is used as a variable in the compiled program's a.out file (program.cpp). I've tried a bunch of different ways to no avail... Help?