Website Summary Files Commits Branches @commit @diff @stats
path: root / pract KN / week8 / Vector.h
blob: db7760de0e2fc0ab171b40aa14bbb8c42053fb44 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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 ;



};