Destroy the basic_istream object.
virtual ~basic_istream()
The basic_istream destructor removes from memory the basic_istream object.
// ewl-test file contains // Ask the teacher anything you want to know #include <iostream> #include <fstream> #include <cstdlib> int main() { using namespace std; ofstream out("ewl-test", ios::out | ios::in); if(!out.is_open()) {cout << "file did not open"; exit(1);} istream inOut(out.rdbuf()); char c; while(inOut.get(c)) cout.put(c); return 0; }
Result:
Ask the teacher anything you want to know