Aracılığıyla paylaş


basic_filebuf::is_open

Bir dosyanın açık olup olmadığını gösterir.

bool is_open( ) const;

Dönüş Değeri

gerçek dosya işaretçisi bir null işaretçi ise.

Örnek

// basic_filebuf_is_open.cpp
// compile with: /EHsc
#include <fstream>
#include <iostream>

int main( ) 
{
   using namespace std;
   ifstream file;
   cout << boolalpha << file.rdbuf( )->is_open( ) << endl;

   file.open( "basic_filebuf_is_open.cpp" );
   cout << file.rdbuf( )->is_open( ) << endl;
}
  

Gereksinimler

Başlık: <fstream>

Namespace: std

Ayrıca bkz.

Başvuru

basic_filebuf Class

iostream programlama

iostreams kuralları