main.cpp 543 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #include <iostream>
  2. #include <fstream>
  3. #include "PointSystem.h"
  4. using namespace std;
  5. int main() {
  6. // Start
  7. cout << "Serial example." << endl;
  8. // Create instance
  9. PointSystem system1;
  10. system1.addPoint(42);
  11. system1.addPoint(420);
  12. system1.addPoint(12);
  13. system1.display();
  14. // Stream workshop output
  15. ofstream sOut("data.txt");
  16. sOut << system1;
  17. sOut.close();
  18. // Input
  19. ifstream sIn("data.txt");
  20. sIn >> system1;
  21. sIn.close();
  22. // Test
  23. system1.display();
  24. return 0;
  25. }