Iterators are a standard interface. By using iterators, you can use the same algorithms with different containers. The final decision whether to use them or not is up to you based on usability and readability.
For example, using the standard transform algorithm to covert std::string
to uppercase:
std::string str = "A String";
std::transform(str.begin(), str.end(), str.begin(), ::toupper);
will result in str
being equal to "A STRING"
.