vector

hi
can anyone help me with this question
I am doing the heap sort and I am using the vector to store the item. Correct me if I am wrong. the first element is store at the position 0. I don't want the first element is store at 0. Is there a way to store the first element at 1?
thanks
Correct me if I am wrong. the first element is store at the position 0. I don't want the first element is store at 0. Is there a way to store the first element at 1?

No. But you can always just store a dummy element at index 0 and ignore it thereafter.
No, there is no way to change this, it works like an array, you could always just discard zero and make 0 not used, but it would be sugggested to just make your code use element zero.
Topic archived. No new replies allowed.