Vectors are new to me and I am having a hard time finding documentation on how to use them. I am also wondering how to use their iterators.
So my goal is to create a vector (essentially a dynamic array) of references/pointers of type Account. I then need to have insert/remove and find functions (presumably using an iterator) for the vector.
Here's documentation on iterator. Gotta be careful using iterator with vector, whenever it resizes any pointers you have to that vector (ie iterators) could become invalidated and you'll need to reset them.
Yeah, I was playing around with std::vector<Account*> and that seems to hold the pointers to Account just fine but then how do I implement random access. I am getting stuck with this-> or * or & and how I can implement things like find.
Would it look like