#include#include using namespace std; int main() { array myArray = {1, 2, 3, 4, 5}; myArray.remove(3); for (auto i : myArray) { cout << i << " "; } return 0; }
#includeIn this example, we create a vector with the values 1, 2, 3, 4, and 5. We then use the erase function to remove the elements at index 1 and 2 (which have the values 2 and 3). The output of the program will be: 1 4 5. Package Library: The TArray class is part of the Unreal Engine framework, which is a popular game development platform. It is included in the core engine package of the framework.#include using namespace std; int main() { vector myVector = {1, 2, 3, 4, 5}; myVector.erase(myVector.begin() + 1, myVector.begin() + 3); for (auto i : myVector) { cout << i << " "; } return 0; }