Connecting Tech Pros Worldwide Forums | Help | Site Map

fin.open function

Newbie
 
Join Date: Mar 2007
Posts: 3
#1: Jul 13 '07
what is the meaning of fin.open function if i use it in the coding?

devikacs's Avatar
Member
 
Join Date: Jun 2007
Location: India
Posts: 96
#2: Jul 13 '07

re: fin.open function


Quote:

Originally Posted by fana

what is the meaning of fin.open function if i use it in the coding?

There is no such function as fin.opn
I suppose you mean that fin is a ifstream[or ofstream] object.

Files in c++ are treated as streams. ifstream is input stream and ofstream is for output. These objects are used while reading or writing to a file. the are under the fstream header and i suggest you look that up too.

open is a function used to open a file.
The syntax is like this
void open ( const char * filename, ios_base::openmode mode = ios_base::in );
this is for ofstream object
void open ( const char * filename, ios_base::openmode mode = ios_base::out );
Reply