| Problem | knapsack | 
|---|---|
| User | xyz | 
| Submission Time | 2023-11-10 11:11:09 | 
| Score | 0 | 
| Max Time | N/A | 
| Max Memory | N/A | 
Owl Get a Life
 knapsack.cpp: In function ‘int main()’:
knapsack.cpp:34:38: error: expected ‘;’ before ‘int’
   34 |   reverse(array.begin(), array.end())
      |                                      ^
      |                                      ;
   35 |   int currWeight, currPrice;
      |   ~~~                                 
knapsack.cpp:38:8: error: ‘currWeight’ was not declared in this scope
   38 |     if(currWeight+i.mass<maxWeight){
      |        ^~~~~~~~~~
knapsack.cpp:43:13: error: ‘currPrice’ was not declared in this scope
   43 |             currPrice += i.price;
      |             ^~~~~~~~~
knapsack.cpp:49:13: error: ‘currPrice’ was not declared in this scope
   49 |             currPrice += i.price;
      |             ^~~~~~~~~
knapsack.cpp:56:11: error: ‘currPrice’ was not declared in this scope
   56 |   cout << currPrice;
      |           ^~~~~~~~~