C++ already solved that problem. Iterator are designed so that an algorithm can be written once and used with multiple data structures.
I really don't see your point
C++ already solved that problem. Iterator are designed so that an algorithm can be written once and used with multiple data structures.