diff --git a/counting_iterator.htm b/counting_iterator.htm index 2549634..d56ddd0 100644 --- a/counting_iterator.htm +++ b/counting_iterator.htm @@ -194,7 +194,8 @@ of pointers. // Fill "numbers" array with [0,N) std::copy(boost::make_counting_iterator(0), boost::make_counting_iterator(N), std::back_inserter(numbers)); - std::vector<int*> pointers; + + std::vector<std::vector<int>::iterator> pointers; // Use counting iterator to fill in the array of pointers. std::copy(boost::make_counting_iterator(numbers.begin()), diff --git a/counting_iterator_example.cpp b/counting_iterator_example.cpp index 67bbb70..9513c06 100644 --- a/counting_iterator_example.cpp +++ b/counting_iterator_example.cpp @@ -32,7 +32,8 @@ int main(int, char*[]) // Fill "numbers" array with [0,N) std::copy(boost::make_counting_iterator(0), boost::make_counting_iterator(N), std::back_inserter(numbers)); - std::vector pointers; + + std::vector::iterator> pointers; // Use counting iterator to fill in the array of pointers. std::copy(boost::make_counting_iterator(numbers.begin()),