| Problem | knapsack |
|---|---|
| User | cobnet |
| Submission Time | 2025-02-15 13:41:56 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
knapsack.cpp: In function ‘int main()’:
knapsack.cpp:34:5: error: ‘totalValue’ was not declared in this scope
34 | totalValue += shoppingList[foo].value * reasonableAmount;
| ^~~~~~~~~~
knapsack.cpp:37:9: error: ‘totalValue’ was not declared in this scope
37 | else{totalValue += shoppingList[foo].value * shoppingList[foo].amount; capacity -= shoppingList[foo].weight * shoppingList[foo].amount;}
| ^~~~~~~~~~