Question: Given a vector , Write a function in C++ that void store(int index,int value) such that value is added to the list in the index
Given a vector >, Write a function in C++ that void store(int index,int value) such that value is added to the list in the index of the vector passed.
void store (int index,int value)
{
vector > A;
// Define rest of function here!
}
For Example
store(1,3)
store(1,5)
store(2,2)
store(2,5)
The list in the1st index of the vector must have values 3 and 5 and the list in the 2nd index of the vector must have values 2 and 5 in the list.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
