1234567891011121314151617181920212223242526272829303132333435363738 |
- #include <iostream>
- #include <fstream>
- #include "PointSystem.h"
- using namespace std;
- int main() {
- // Start
- cout << "Serial example." << endl;
- // Create instance
- PointSystem system1;
- system1.addPoint(42);
- system1.addPoint(420);
- system1.addPoint(12);
- system1.display();
- // Stream workshop output
- ofstream sOut("data.txt");
- sOut << system1;
- sOut.close();
- // Input
- ifstream sIn("data.txt");
- sIn >> system1;
- sIn.close();
- // Test
- system1.display();
- return 0;
- }
|