Iterator Example

What does this line means?
template<class ForwardIterator,classT> (line 17 in video).
Also please explain list< int >::iterator . (used in line41)

@56amrut.bhokardankar do you know about template classes?

yes i know, i’ve watched the video too, but i didn’t get particularly this line, and also the next line which was replaced by keyword auto later on in video

@56amrut.bhokardankar the second line is just the datatype of the iterator, like you use int, char, etc but it can be replaced with the “auto” keyword as well.
WHat did you not understand in that line? its just the syntax of the template class.

oh well, i got it now, was confused earlier

1 Like

@56amrut.bhokardankar please mark the doubt as resolved