P
Pat
Hi,
I use "vector<int> v" in my program. If "v" contains the following:
(front) 1 2 3 4 2 5 7 1 (end),
I want to remove some element, say "2", and I want the resultant "v" to be
as follows:
(front) 1 3 4 5 7 1 (end)
What function should I use? "erase" or "remove"? On the other hand, if my
vector is very larger (say 50000 elements). What function is efficient to do
the above action?
Thanks for your help.
Pat
I use "vector<int> v" in my program. If "v" contains the following:
(front) 1 2 3 4 2 5 7 1 (end),
I want to remove some element, say "2", and I want the resultant "v" to be
as follows:
(front) 1 3 4 5 7 1 (end)
What function should I use? "erase" or "remove"? On the other hand, if my
vector is very larger (say 50000 elements). What function is efficient to do
the above action?
Thanks for your help.
Pat