Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool itemsMatch(vector<Nutrient> nut, vector<Ingredient> ing) {
- int matchCount = 0;
- for (int i = 0; i < nut.size(); i++) {
- for (int j = 0; j < ing.size(); j++) {
- if (nut[i].name == ing[j].name) {
- cout << nut[i].name << " matched " << ing[j].name << endl;
- cout << "n";
- }
- }
- return true;
- }
- struct Nutrient {
- string name, units;
- double amount, calories;
- };
- struct Ingredient {
- string name, units;
- double amount;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement