Website Summary Files Commits Branches @commit @diff @stats
path: root / pract KN / week8 / Vector.h
diff options
context:
space:
mode:
Commit65f6397bb288ab3a8313e26259d02df43f7e1454 (patch)
Author
 Stoycho Kyosev <68247567+stoychoX@users.noreply.github.com>
2022-04-12 20:13:46 +0300
Committer
 GitHub <noreply@github.com>
2022-04-12 20:13:46 +0300
Files45d7579b3e1d36249196697f64ba693da542046f /pract KN/week8/Vector.h
Object-oriented_programming_FMI-65f6397bb288ab3a8313e26259d02df43f7e1454.tar
Object-oriented_programming_FMI-65f6397bb288ab3a8313e26259d02df43f7e1454.tar.gz
Object-oriented_programming_FMI-65f6397bb288ab3a8313e26259d02df43f7e1454.zip
Parent8f89ceead9f267194d0ca2b66bbda00730654d45 (diff)
Add files via upload
1 files changed, 27 insertions, 0 deletions
-rw-r--r--pract KN/week8/Vector.h27
diff --git a/pract KN/week8/Vector.h b/pract KN/week8/Vector.h
new file mode 100644
index 0000000..db7760d
--- /dev/null
+++ b/pract KN/week8/Vector.h
@@ -0,0 +1,27 @@
+#pragma once
+#include<exception>
+class Vector
+{
+ int* arr = nullptr;
+ int size;
+ int capacity;
+
+ void resize();
+ void free();
+ void copyFrom(const Vector&);
+
+public:
+ Vector();
+ Vector(const Vector&);
+ Vector& operator = (const Vector&);
+ ~Vector();
+
+ void push_back(const int);
+ int getSize()const;
+ int& operator [](const int);
+ const int& operator [](int)const ;
+
+
+
+};
+