how to erase elemts accoding to index c++ code example Example: how to erase elemts accoding to index c++ arr.erase(arr.begin() + i);