Monday, May 24, 2010

In C++ what is <fstream> good for?

I've just read a tutorial about file i/o at http://www.cprogramming.com/tutorial/les...





I understand it, but I don't know what it is good for. It seems like this is just an elongated process of writing cout %26lt;%26lt; "text";

In C++ what is %26lt;fstream%26gt; good for?
cout is the output stream that displays text in a console or command prompt if it is not redirected. CGI uses it for HTTP responses. %26lt;fstream%26gt; contains classes for reading/writing files that normally are written to your hard disk or some other secondary storage.

buy flowers

No comments:

Post a Comment