My vector class isn't working when i create objects

Whenever I try to create an object I get this error:
"Implicit instantiation of undefined template 'std::__1::vector<int, std::__1::allocator<int> >'"

Here is the main file, I've commented where the error occurs.
https://pastebin.com/tSHPFzVe

Here is the header file with the class.
https://pastebin.com/1SRUMChZ
Your vector class template is named myVector so you need to use that name when creating the objects.

1
2
myVector<int> myvecA;
myVector<int> myvecB(10);
Okay, I did that and it led to a whole host of new errors. Whenever I call the object in the program it now gives me the error "Type 'myVector<int>' does not provide a subscript operator"
What is supposed to happen, if I write:
myvecB [ 7 ] = 42;

Your (template) class does not have operator[](size_t), does it?
Oh no it doesn't, I didn't realize it needed an overload operator. Thank you m'lord.
Topic archived. No new replies allowed.