#define rows 2
#define cols 2
#define NUM_CORNERS 4
int main(void) {
int i;
int the_corners[NUM_CORNERS];
int array[rows][cols] = {{1, 2}, {3, 4}};
corners(array, the_corners);
for (i = 0; i < 4; i++) printf("%d\n", the_corners[i]);
}
int corners (int array[rows][cols], int the_corners[]) {
the_corners = {
array[0][cols-1],
array[0][0],
array[rows-1][0],
array[rows-1][cols-1]
};
}
Я получаю эти странные ошибки и понятия не имею, почему:
prog.c: In function ‘main’:
prog.c:10: warning: implicit declaration of function ‘corners’
prog.c: In function ‘corners’:
prog.c:15: error: expected expression before