Can we use iterator more than one times in c++?

In general it can, assuming you haven’t invalidated it in some way.

Please post full, formatted code that produces the compiler error, plus the command-line you use to compile it and the resulting compiler error - otherwise, we’ll spend all day trying to guess what the issue is :slight_smile:

3 Likes