when I try to test the code I get an infinite loop of errors: UndefinedBehaviorSanitizer:DEADLYSIGNAL
what am i missing ???
void grayscale(int height, int width, RGBTRIPLE image[height][width]) {
for (int i = 0; i < width; i++)
{
for (int j = 0; j < height; j++)
{
int greysc = round((image[i][j].rgbtRed + image[i][j].rgbtGreen + image[i][j].rgbtBlue) / 3);
image[i][j].rgbtRed = greysc;
image[i][j].rgbtGreen = greysc;
image[i][j].rgbtBlue = greysc;
}
}
return;
}