#pragma once 

#include <stdio.h>  
#include <stdlib.h>  
#include <string.h> 
#include <vector>

template <class T>
class Array {
private:
	std::vector<T*> elements;

public:
	Array() { }

	virtual ~Array() {
		for (auto& elem : elements)
			delete elem;
		elements.clear();
	}

	void add(T* new_line) {
		elements.push_back(new_line);
	}

	int getLength() const {
		return (int)elements.size();
	}

	T* get(int i) {
		return elements[i];
	}

	const std::vector<T*>& getElements() const {
		return elements;
	}
};