0

I want to check if the array exists for the edges so I've been trying to check if the block is NULL.

if (image[i-1][j-1] != NULL);
    {
        redAverage+=image[i-1][j-1].rgbtRed;
        blueAverage+=image[i-1][j-1].rgbtBlue;
        greenAverage+=image[i-1][j-1].rgbtGreen;
        counter++;
    }

However the error I get is *error: invalid operands to binary expression ('RGBTRIPLE' and 'void ')

Any help on how to fix this error would be greatly appreciated!

0

wouldn't it be easier to check if i-1, j-1, i+1 or j+1 are within acceptable limits?

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .