View Full Version : streams, C

Louis de Broglie
March 31st, 2007, 06:17 AM

I am a bit confused:confused: about what streams(used for file I/O in C && C++) are. Can anybody clarify it to me?

March 31st, 2007, 08:20 AM
Computers are limited, in common programming you are only allowed to read and write data one "chunk" at a time. Due to this severe limitation, files, and pretty much any other data source, can only really be operated on in small pieces. To make any logical sense out of a data source, it needs to be processed in order so the designers of the standard template library, for C++, decided to encapsulate the file reading mechanism into the paradigm of a stream. The stream allows you to read data from a file or other supported data source in order, one piece at a time, and process those pieces in your own program easily and with high portably.

March 31st, 2007, 11:35 AM
try http://en.wikipedia.org/wiki/Stream_%28computer%29

Louis de Broglie
April 3rd, 2007, 07:45 AM
thanks for your help guys.