A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.tutorialspoint.com/cpp_standard_library/fstream.htm below:

C++ fstream Library

C++ Library - <fstream> Introduction

This data type represents the file stream generally, and has the capabilities of both ofstream and ifstream which means it can create files, write information to files, and read information from files.

Definition

Below is definition of std::fstream.

template<
   class CharT, 
   class Traits = std::char_traits<CharT>> 
class basic_fstream : public std::basic_iostream<CharT, Traits>
Parameters Member types

Following member types can be used as parameters or return type by member functions.

Sr.No. Member types Definition 1 char Character Type 2 char_traits<char> traits_type 3 int const value_type 4 int int_type 5 streampos pos_type 6 streamoff off_type Functions from <fstream>

Below is list of all methods from <fstream>

Member functions Sr.No. Method & description 1 fstream::close

Closes the file currently associated with the object, disassociating it from the stream.

2 fstream::is_open

Returns whether the stream is currently associated to a file.

3 fstream::open

Opens the file identified by argument filename, associating it with the stream object.

4 fstream::operator=

Returns a constant iterator which points to the start of the array.

5 fstream::rdbuf

Returns a pointer to the internal filebuf object.

6 fstream::swap

Exchanges all internal data between x and *this.

Non-member overloaded functions Sr.No. Method & description 1 swap-free

Exchanges the values of the fstream objects x and y.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4