Skip to content

Instantly share code, notes, and snippets.

std::vector<CashFlow> flows = ...
auto firstPositiveFlow = std::find_if(flows.begin(), flows.end(), isPositive);
std::cout << "Made " << firstPositiveFlow->getValue() << "$, at last!\n;
std::vector<CashFlow> flows = ...
auto it = std::find_if(flows.begin(), flows.end(), isPositive);
std::cout << "Made " it->getValue() << "$, at last!\n";
std::vector< pair<EmployeeId, double> > computeEmployeeSalaries();
std::vector< pair<EmployeeId, double> > computeSalariesPairVector();
if (!isValid(id))
{
if (isNotValid(id))
{
saveEmployee(manager);
save(manager);
void save(Employee const& employee);
void saveEmployee(Employee const& employee);