I have an assignment that is the following:
For a given integer array, find the sum of its elements and print out the final result, but to get the sum, you need to e
why not just:
for_each( array, array+10, myFunction);
I'm quite sure that int* can be used as iterator
int*
EDIT: just checked this, it can indeed