#include <stdio.h> #include <string.h> #define K 4 #define W 4 void swap( int (*m)[5], const int w1, const int w2) { int (*temp)[5] = m[w1]; m[w1] = m[w2]; m[w2] = temp; } int main(void) { return 0; }
Standard input is empty
prog.c: In function ‘swap’: prog.c:9:20: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] int (*temp)[5] = m[w1]; ^ prog.c:10:9: error: assignment to expression with array type m[w1] = m[w2]; ^ prog.c:11:9: error: assignment to expression with array type m[w2] = temp; ^
Standard output is empty