Skip to content

Instantly share code, notes, and snippets.

@madbence
Last active December 16, 2015 07:28
Show Gist options
  • Save madbence/5398527 to your computer and use it in GitHub Desktop.
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
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