| Term | Definition |
| ofstream | stream class to write on files |
| ifstream | stream class to read from files |
| fstream | stream class to both read and write from/to files |
| file.open (filename, mode); | in order to open a file with a stream object |
| file.close() | to close a file |
| eof () | member function that returns true in the case that the end of the file has been reached |
| bad () | Returns true if a reading or writing operation fails. For example in the case that we try to write to a file that is not open for writing or if the device where we try to write has no space left. |
| fail () | Returns true in the same cases as bad(), but also in the case that a format error happens, like when an alphabetical character is extracted when we are trying to read an integer number. |
| good () | It is the most generic state flag: it returns false in the same cases in which calling any of the previous functions would return true. |
| get pointer | points to the element to be read in the next input operation |
| put pointer | points to the location where the next element has to be written |
| tellg() | have no parameters, return a value of the member type pos_type, which is an integer data type representing the current position of the get stream pointer |
| tellp() | have no parameters, return a value of the member type pos_type, which is an integer data type representing the current position of the put stream pointer |
| seekg( position ); | allow us to change the position of the get to the absolute position "position" |
| seekp( position ); | allow us to change the position of the put to the absolute position "position" |
| seekg( offset, direction ); | allow us to change the position of the get to an offset value relative to some specific point |
| seekp( offset, direction); | allow us to change the position of the put to an offset value relative to some specific point |
| write ( memory_block, size ); | inputs binary data sequentially; is a member function of ostream inherited by ofstream |
| read ( memory_block, size ); | outputs binary data sequentially; is a member function of istream and is inherited by ifstream |
| ifstream::pos_type | is a specific type used for buffer and file positioning and is the type returned by file.tellg() |
| memory_block | is of type "pointer to char" (char*), and represents the address of an array of bytes where the read data elements are stored or from where the data elements to be written are taken |
| size | parameter is an integer value that specifies the number of characters to be read or written from/to the memory block. |