Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C++
Accept either an iterator or a reverse_iterator
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Martijn Lievaart, post: 1471433"] The way this is done most often, is to use a template: template<typename T1, typename T2> void print(T1 start, T2 end) { while (start != end) cout << *start++; } HTH, M4 [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
Accept either an iterator or a reverse_iterator
Top