Still new to this. What is wrong with this code? I'm trying to make and use a 2 dimensional array. Is my general idea correct? To step through it with nested for loops? What exactly is wrong with my code? It won't compile.
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
const double NUM_MONKEYS = 3;
const double NUM_DAYS = 5;
double monkeys[NUM_MONKEYS][NUM_DAYS];
int row, column;
for (row = 0, row < NUM_MONKEYS, row++)
{
for (column = 0, column < NUM_DAYS, column++)
{
cout << "Input amount of food eaten by monkey: " << row + 1;
cout << " and day: " << column + 1 << endl;
cin >> monkeys[row][column];
}
}
return 0;
}
There's something I'm not getting, thanks!