For this assignment I have to increment a neighboring element in the 2D array. I'm sure I'm just having a massive brain fart, but I'm confused on how to increment.
for(int i = 0; i < height(); i++)
{
for(int j = 0; j < width(); j++)
{
if(weights[i][j] < 1000000 && weights[i][j] < W_FINISH)
{
weights[i][j] = weights[i][j] = 0;
weights[i][j] = weights[i][j] + 1;
}
}
}
the expected output should be the first image however I am getting the second image