I have been told to write a class like "vector" class.
I wanted to start writing a class that creates linked lists, but before that I wanted to make sure if VECTOR uses linked lists or not?
Is there any other method like that?
So how should I write a vector class?
Should I use simple arrays and everytime user wants to add or delete some data, I should make a copy of that with new datas?
I don't think that's a good way (considering time and operations).
Sorry I'm asking here, but what should I do?
I don't have much time for research, may you guide me?
my exam day Is approaching.
I'm pretty sure a vector is just an array that makes a new array with twice the amount of space when the limit is reached.
I think that's roughly right, though it seems to be compiler dependent. I tried testing the capacity of a vector using two different compilers, one seemed to double the size every time it was filled up, the other did a more modest 50% size increase.