how i replace an element?
Hello all.
I have iterator it from a wstring vector, and i whant to replace the element in it
1 2 3 4 5 6
|
vector<wstring> a;
wstring b(L"a new element");
.......
// i have iterator it to some elemement and i must replace it whith b
// how?
|
Thank's
Jim
1 2 3
|
vector<wstring> a;
wstring b(L"a new element");
std::swap(*it, b);
|
Thank's very mutch
Jim
Last edited on
Topic archived. No new replies allowed.