Last active
December 16, 2015 07:28
-
-
Save madbence/5398527 to your computer and use it in GitHub Desktop.
Szoftver laboratórium 2, 10. labor, 11. feladat, első próbálkozás
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<class T> | |
void print(const T& o) { | |
cout<<o<<", "; | |
} | |
//meghívás: | |
forEach(it1, it1+10, print<int>); | |
//de működik iterátorral is, minden varázslás nélkül! | |
forEach(intarr1.begin(), intarr1.end(), print<int>); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment