Programming on C, weirdly I declare void edges(...) output as void and do the same thing below int main(void) however, I get an error message that I'm declaring a different output. I was wondering what is wrong with this?
#include <math.h>
#include <stdio.h>
#include <cs50.h>
typedef struct{
int rgbtBlue;
int rgbtGreen;
int rgbtRed;
}
RGBTRIPLE;
int make_image_array(int);
void edges(int, int, RGBTRIPLE);
int main(void){
edges(height, width, image[height][width]);
}
void edges(int height, int width, RGBTRIPLE image[height][width])
{}

The error message on terminal which says conflicting types for the function edges???
void edges(int, int, RGBTRIPLE);is notvoid edges(int, int, (*RGBTRIPLE)[width]);Since you are using a VLA,void edges(int a, int b, RGBTRIPLE[a][b]);will work. With your current code shown, there is no need to link against-lcs50,-lcryptor-lm-- add them when you use something that requires them. - David C. Rankin