diff options
| author | Syndamia <kamen@syndamia.com> | 2024-04-22 17:30:29 +0300 |
|---|---|---|
| committer | Syndamia <kamen@syndamia.com> | 2024-04-22 17:30:29 +0300 |
| commit | f4642325f58172e85b9e41e35f69e8bea46f78c6 (patch) | |
| tree | 038377e89be336cbb91469dd526cebbfcfe02df5 /week09/Exercise2/main.cpp | |
| parent | f3406754705e508f57768d3d0d8e457ff5b7620c (diff) | |
| download | oop-2023-solutions-f4642325f58172e85b9e41e35f69e8bea46f78c6.tar oop-2023-solutions-f4642325f58172e85b9e41e35f69e8bea46f78c6.tar.gz oop-2023-solutions-f4642325f58172e85b9e41e35f69e8bea46f78c6.zip | |
[w9] Added solutions to ex 1-2
Diffstat (limited to 'week09/Exercise2/main.cpp')
| -rw-r--r-- | week09/Exercise2/main.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/week09/Exercise2/main.cpp b/week09/Exercise2/main.cpp new file mode 100644 index 0000000..981e252 --- /dev/null +++ b/week09/Exercise2/main.cpp @@ -0,0 +1,29 @@ +#include "Date.h" + +int main() { + Date d1(5, 12, 2012); + Date d2(18, 3, 1999); + Date d3(10, 1, 2020); + Date d4(30, 7, 1975); + Date d5(2, 8, 1300); + + d1.StoreText("dates.txt"); + d2.StoreText("dates.txt"); + d3.StoreText("dates.txt"); + d4.StoreText("dates.txt"); + d5.StoreText("dates.txt"); + + Date nd1, nd2, nd3, nd4, nd5; + + nd1.LoadText("dates.txt"); + nd2.LoadText("dates.txt"); + nd3.LoadText("dates.txt"); + nd4.LoadText("dates.txt"); + nd5.LoadText("dates.txt"); + + nd5.print(); + nd4.print(); + nd3.print(); + nd2.print(); + nd1.print(); +} |
