From 65f6397bb288ab3a8313e26259d02df43f7e1454 Mon Sep 17 00:00:00 2001 From: Stoycho Kyosev <68247567+stoychoX@users.noreply.github.com> Date: Tue, 12 Apr 2022 20:13:46 +0300 Subject: Add files via upload --- pract KN/week8/Vector.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 pract KN/week8/Vector.h (limited to 'pract KN/week8/Vector.h') 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 +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 ; + + + +}; + -- cgit v1.3.1-23-gd82d