// Expect to print values of arr[0] to arr[4]
#include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int *> ptrList;
int arr[] = { 0, 10, 20, 30, 40 };
int * ptrArr = arr;
for( int i=0; i< 5; i++ ) {
ptrList.push_back( ptrArr+i );
}
vector<int *>::iterator itr = ptrList.begin();
for( int i=1; i<= 5; i++ ) {
cout << **itr-1 << endl;
itr++;
}
return 0;
}
somebody help me please...dunno where i went wrong :(