Networking, Programming and Graphics Tutorials

Steps in opening file using constructor - C++ [1/1]

Type:
Steps in opening file using constructor - C++
Level: Expert Networking, Programming and Graphics Tutorials Networking, Programming and Graphics Tutorials Networking, Programming and Graphics Tutorials 
Steps in opening file using constructor - C++
Date: 2006-Dec-12
Steps in opening file using constructor - C++
Visited: 1201 times
Steps in opening file using constructor - C++
Rating: Steps in opening file using constructor - C++
Steps in opening file using constructor - C++
Author: Alex Plumpton

The first step is to create a file stream object to manage the stream using the appropriate class. That is, the class ofstream is used to create the output stream and the class ifstream to create the input stream. Initialize the file object, with the desired file name. Outfile, an ofstream object manages the output stream that is created. Then the file stream Write is opened using outfile. The statement declares in file as an ifstream object and attaches it to the file Read for reading.

Example

Ofstream outfile 
("Write");
Ifstream infile ("Read");

Rate this tutorial:                    
Networking, Programming and Graphics Tutorials - Steps in opening file using constructor - C++ [1/1] - Networking, Programming and Graphics Tutorials

Need a specific tutorial? Do not hesitate and submit a request!
Related Tags: steps in opening a file  steps of opening a file  opening file using constructor  opening file using constructor  opening file with constructor in c++  opening a file in c++ usinf constructor and open function  opening using constructor  opening using constructor  steps involved in using a file in c++  c++ opening a file