414                                              D. -

ofstream(const char*, int = ios::out,
int prot = filebuf::openprot);

    ,     
 .         -
  .     .  
   .

        ios:

 

	
ios ios		in 	   
ios ios		out ate	       
ios ios ios		nocreate trunc noreplace	,          ,   

 ,     if stream   ,  
of stream   .     ,    -
  (bad state).       !.  -
,    ,    
failure.

  -,  sfstream.h :

//  if stream
void open(const char*, int = ios::in,
int prot = filebuf::openprot);

//  of stream
void open(const char*, int = ios::out,
int prot = filebuf::openprot);

void close() ;

         . 
        ,  -
  open ()     .   
close ()       ,    . -
 -    -  -
    .

  dbl_sp.cpp

//     
//: __ ! 2
//!    
// 2,   ,    