Skip to content

Instantly share code, notes, and snippets.

@cjameshuff
Created November 21, 2012 17:39
Show Gist options
  • Save cjameshuff/4126357 to your computer and use it in GitHub Desktop.
Save cjameshuff/4126357 to your computer and use it in GitHub Desktop.
int op(int t) {return 2*t;}
int main(int argc, const char * argv[])
{
vector<int> data;
data.push_back(1);
data.push_back(2);
data.push_back(3);
data.push_back(4);
data.push_back(5);
vector<int>::iterator x;
for(x = data.begin(); x != data.end(); ++x)
printf("%d\n", op(*x));
return EXIT_SUCCESS;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment