How to Create a own Vector Class

Hi Everyone!!

I am trying to write my own template vector class but I don't know exactly how it works..

I need only some basic functions to store the elements, read the elements at start and end and pushback the elements in array.. I may like to have some size function to know the size of the elements. declaration as below:

template<class T>
class myVector
{
public:
myVector();
~myVector();
void push_back(T elm);
void pop_back();
T at(int index);
begin();
end();
size();

private:
T list[100];
int size;
};


can anybody write simple implementation for myVector class pls??
Topic archived. No new replies allowed.