Website Summary Files Commits Branches @commit @diff @stats
path: root / pract_SI / Pract. 10 / task2 / main.cpp
diff options
context:
space:
mode:
Commit7104c90385c02473bba9880b0fcd28ffbf1940bc (patch)
Author
 Justsvetoslavov <justsvetoslavov@gmail.com>
2022-01-17 21:47:35 +0200
Committer
 Justsvetoslavov <justsvetoslavov@gmail.com>
2022-01-17 21:47:35 +0200
Files851a0e7f75b2cc097715ef74b2584e582524eb45 /pract_SI/Pract. 10/task2/main.cpp
Introduction_to_programming_FMI-7104c90385c02473bba9880b0fcd28ffbf1940bc.tar
Introduction_to_programming_FMI-7104c90385c02473bba9880b0fcd28ffbf1940bc.tar.gz
Introduction_to_programming_FMI-7104c90385c02473bba9880b0fcd28ffbf1940bc.zip
Parent97b4d62734acf7533a96b08bcc6044eb94847931 (diff)
Add Struct tasks.
1 files changed, 23 insertions, 0 deletions
-rw-r--r--pract_SI/Pract. 10/task2/main.cpp23
diff --git a/pract_SI/Pract. 10/task2/main.cpp b/pract_SI/Pract. 10/task2/main.cpp
new file mode 100644
index 0000000..0fcc55c
--- /dev/null
+++ b/pract_SI/Pract. 10/task2/main.cpp
@@ -0,0 +1,23 @@
+#include "ListofPoints.h"
+
+int main()
+{
+ ListofPoints list;
+ Point A;
+ Point B;
+ A.x = A.y = 9;
+ B.x = B.y = 4;
+
+ for (size_t i = 0; i < 10; i++)
+ {
+ list.addPoint(A);
+ }
+ list.addPoint(B);
+ list.Print();
+ std::cout << list.size<<std::endl;
+ list.pop();
+ list.Print();
+ list.clear();
+ std::cout << list.size;
+
+} \ No newline at end of file