Update main.cpp

Add test code for iterators