Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ostream& ClassObject::output(ostream& os) const
- {
- os << "Details";
- return os;
- }
- #include "ClassObject"
- #include <fstream>
- #include <iostream>
- using namespace std;
- int main()
- {
- ClassObject ob;
- cout << ob; // print info to console window
- // save info to .txt file
- ofstream fileout;
- fileout.open("filename.txt", ios::app);
- fileout << ob;
- fileout.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement