STL
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
Hi, I have a vector object that has some elements in it and I want to remove an item completly from the vector. Here is what I mean, vector inV; for (i=0; i<10; i++) inV.push_back(i); I would like to call a function that will remove one of the items and leave me with 9 elements in the vector. I tried using remove(...), but that doesn't do what I want. If I use remove, I have to copy the valid elements from one vector to another and I don't really want to do that just each time I have to delete an element. If this is possible please let me know. Thank in advance