Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
4003CEM-iterators/lab_iterators.h
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
19 lines (16 sloc)
606 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
using namespace std; | |
void print_vector( std::vector<int>::iterator beginningOfVector, | |
std::vector<int>::iterator endOfVector ) | |
{ | |
/* Code should print out all the values in the vector seperated | |
by commas. | |
First in forward and then in reverse order. | |
You must use iterators to do this | |
E.g. if the vector contains the value 1, 2 and 3 then code should | |
output: | |
1, 2, 3, 3, 2, 1 */ | |
// to get you started, prints first thing in the vector | |
//std::cout << *beginningOfVector << std::endl; | |
} |