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