Modify the existing vector's contents, by erasing the element at index 1 (initially 200), then inserting 100 and 102 in the shown locations. Use Vector ADT's erase() and insert() only, and remember that the first argument of those functions is special, involving an iterator and not just an integer. Sample output of below program with input 33 200 10:
#include #include using namespace std;void PrintVectors(vector numsList) {unsigned int i;for (i = 0; i < numslist.size();="" ++i)="">cout < numslist.at(i)="">< "="">}cout <>}int main() {vector numsList;int userInput;int i;for (i = 0; i < 3;="" ++i)="">cin >> userInput;numsList.push_back(userInput);}/* Your solution goes here */PrintVectors(numsList);return 0;}Please help me with this problem using c++.
void PrintVectors(vector numsList) {unsigned int i;for (i = 0; i < numslist.size();="" ++i)="">cout < numslist.at(i)="">< "="">}cout <>}int main() {vector numsList;int userInput;int i;for (i = 0; i < 3;="" ++i)="">cin >> userInput;numsList.push_back(userInput);}/* Your solution goes here */PrintVectors(numsList);return 0;}Please help me with this problem using c++.
for (i = 0; i < numslist.size();="" ++i)="">cout < numslist.at(i)="">< "="">}cout <>}
int main() {vector numsList;int userInput;int i;for (i = 0; i < 3;="" ++i)="">cin >> userInput;numsList.push_back(userInput);}/* Your solution goes here */PrintVectors(numsList);return 0;}Please help me with this problem using c++.
for (i = 0; i < 3;="" ++i)="">cin >> userInput;numsList.push_back(userInput);}
/* Your solution goes here */
PrintVectors(numsList);
return 0;}
Please help me with this problem using c++.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here