For taking input from a file...
In linux,
$./a.out < in_filename
In windows(working on Cygwin or MingW),
$a.exe < i.in
Similarly for storing output into a file...
In Linux,
$./a.out < out_filename
In widnows,
$a.exe < out_filename
the file can have any extension as such .txt,.c,.cpp... etc reads like a binary file i suppose(txt always works). It assumes this file that you provide as the Console...so enjoy saving time on debugging programs that have large inputs.
No comments:
Post a Comment