Skip to content

Instantly share code, notes, and snippets.

@joboccara
Created February 18, 2017 22:19
Show Gist options
  • Save joboccara/d0607c39c9c35b511d9bc0ff54e43f50 to your computer and use it in GitHub Desktop.
Save joboccara/d0607c39c9c35b511d9bc0ff54e43f50 to your computer and use it in GitHub Desktop.
std::vector<CashFlow> flows = ...
auto firstPositiveFlow = std::find_if(flows.begin(), flows.end(), isPositive);
std::cout << "Made " << firstPositiveFlow->getValue() << "$, at last!\n;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment