Whatever the operations we may perform on the files we have to open the file.As stated earlier for the opening stram and then link to the file name.A file sream can be defining using classes its stream,ofstream and fstream that are contained in the header file f stream .h the class to be used depends upon the purpose whether we want to read the data or write to a file a file can be opened in two ways.
1. The ostream class derived from the ios class and provides out put classes
2.The istream class also derived from the ios class and and ostream class and thus inherits both input and output methods
1.using the constructor function open() of the class
2.Usinf the member functioon open()of the class.More
No comments:
Post a Comment