Skip to content

Instantly share code, notes, and snippets.

@bertrandmartel
Last active August 29, 2015 14:20
Show Gist options
  • Save bertrandmartel/ffbdb91b93a7c0c90b76 to your computer and use it in GitHub Desktop.
Save bertrandmartel/ffbdb91b93a7c0c90b76 to your computer and use it in GitHub Desktop.
[ CPP ] iterate through vector of struct
for(std::vector<customStruct>::iterator it = my_vect.begin(); it != my_vect.end(); ++it) {
if (code==(*it).code_value)
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment