http://www.cplusplus.com/doc/tutorial/basic_io.html