The best way to read input and save output to file is use I/O redirects.

Basically you just read input from stdin and print the output to stdout and log 
your debug info to stderr.

---

After you downloaded the input file and saved as input.in,
you can run your program using

./myapp < input.in > output.out

after your program finished, output.out will contains everything you print to 
stdout. Everything you print to stderr should still go to the console.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-code+unsubscr...@googlegroups.com.
To post to this group, send email to google-code@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/3c7cb7a5-7a76-4b2a-8381-38d3b3cce7f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to