Share useful concept in C++ OOP

Just comment out the last two function means that you do not want to override it, so it uses parent class implementation.
int peek() {
if(hasNext()){
Iterator it(*this);
return it.next();
}
}
// hasNext() and next() should behave the same as in the Iterator interface.
// Override them if needed.
/*int next() {
}
bool hasNext() const {
}*/