How can I redirect cin to in.txt and cout to out.txt?
cin
in.txt
cout
out.txt
assuming your compiles prog name is x.exe and $ is the system shell or prompt
$ x outfile
will take input from infile and will output to outfile .