reference, tutorial, tutorials, help, example, photoshop, html, php, mysql, 3d software, internet, graphics, programming, multimedia

Opening files using open - C++ [1/1]

Type:
Opening files using open - C++
Level: Intermediate reference, tutorial, tutorials, help, example, photoshop, html, php, mysql, 3d software, internet, graphics, programming, multimedia reference, tutorial, tutorials, help, example, photoshop, html, php, mysql, 3d software, internet, graphics, programming, multimedia 
Opening files using open - C++
Date: 2006-Dec-12
Opening files using open - C++
Visited: 1389 times
Opening files using open - C++
Rating: Opening files using open - C++
Opening files using open - C++
Author: Alex Plumpton
For the file opening, a file stream must be create and then it should be linked to the filename. The file stream can be defined using the classes ifstream ofstream and fstream that are contained in the header file fstream.h. The class to be used depends up on the purpose, that is whether the file is opened for reading or writing data. A file can be opened in two ways. Using the constructor function of the class. Using the member function open() of the class.

Example

ofstream outfile
;                  // create stream (for output)
outfile.open ("file 1")              // connect stream to file 1
outfile.close();                     //Disconnect stream from file 1
outfile.open ("file2")              //Connect stream to file2
outfile.close();                     //Disconnect stream from file2
Rate this tutorial:                    
reference, tutorial, tutorials, help, example, photoshop, html, php, mysql, 3d software, internet, graphics, programming, multimedia - Opening files using open - C++ [1/1] - reference, tutorial, tutorials, help, example, photoshop, html, php, mysql, 3d software, internet, graphics, programming, multimedia

Need a specific tutorial? Do not hesitate and submit a request!
Related Tags: c++ open multiple files on linux  opening webcam in trillian  dos command for opening remote desktop  Open C++  file* open c++  open file with parameter c++  ccproxy open port  open folder in ftp mput  open port for trillion webcam  view open connections to server  view open server connections  Server and Viewing Open Connections  view open connections on server  script nurbs open source  create bar code open source  surface blur open source  windows remote desktop open port  how to enter in to a remote PC uing its open port no  how to open the remote desktop port on win2k3  open remote desktop in command prompt