prog.c: In function ‘init_gr’:
prog.c:13:19: error: ‘DETECT’ undeclared (first use in this function)
int gdriver = DETECT, gmode, errorcode;
^~~~~~
prog.c:13:19: note: each undeclared identifier is reported only once for each function it appears in
prog.c:15:5: error: implicit declaration of function ‘initgraph’ [-Werror=implicit-function-declaration]
initgraph(&gdriver, &gmode, "");
^~~~~~~~~
prog.c:17:17: error: implicit declaration of function ‘graphresult’ [-Werror=implicit-function-declaration]
errorcode = graphresult();
^~~~~~~~~~~
prog.c:18:22: error: ‘grOk’ undeclared (first use in this function)
if (errorcode != grOk) /* an error occurred */
^~~~
prog.c:20:36: error: implicit declaration of function ‘grapherrormsg’ [-Werror=implicit-function-declaration]
printf("Graphics error: %s\n", grapherrormsg(errorcode));
^~~~~~~~~~~~~
prog.c:20:30: error: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘int’ [-Werror=format=]
printf("Graphics error: %s\n", grapherrormsg(errorcode));
^
prog.c:22:5: error: implicit declaration of function ‘getch’ [-Werror=implicit-function-declaration]
getch();
^~~~~
prog.c: In function ‘end_gr’:
prog.c:31:5: error: implicit declaration of function ‘closegraph’ [-Werror=implicit-function-declaration]
closegraph();
^~~~~~~~~~
prog.c: In function ‘MoveTo’:
prog.c:38:5: error: implicit declaration of function ‘moveto’ [-Werror=implicit-function-declaration]
moveto(x,y);
^~~~~~
prog.c: In function ‘LineTo’:
prog.c:45:5: error: implicit declaration of function ‘lineto’ [-Werror=implicit-function-declaration]
lineto(x,y);
^~~~~~
prog.c: At top level:
prog.c:47:11: error: type defaults to ‘int’ in declaration of ‘N’ [-Werror=implicit-int]
const N=6; // number of points in the figure
^
prog.c:52:5: error: unknown type name ‘actions’
actions action;
^~~~~~~
prog.c:55:7: error: variably modified ‘figure’ at file scope
} figure[N]={{MOVE,360,270},{DRAW,360,260},{DRAW,355,260},{DRAW,360,250},
^~~~~~
prog.c:55:33: error: excess elements in array initializer [-Werror]
} figure[N]={{MOVE,360,270},{DRAW,360,260},{DRAW,355,260},{DRAW,360,250},
^
prog.c:55:33: note: (near initialization for ‘figure’)
prog.c:55:48: error: excess elements in array initializer [-Werror]
} figure[N]={{MOVE,360,270},{DRAW,360,260},{DRAW,355,260},{DRAW,360,250},
^
prog.c:55:48: note: (near initialization for ‘figure’)
prog.c:55:63: error: excess elements in array initializer [-Werror]
} figure[N]={{MOVE,360,270},{DRAW,360,260},{DRAW,355,260},{DRAW,360,250},
^
prog.c:55:63: note: (near initialization for ‘figure’)
prog.c:56:5: error: excess elements in array initializer [-Werror]
{DRAW,365,260},{DRAW,360,260}};
^
prog.c:56:5: note: (near initialization for ‘figure’)
prog.c:56:20: error: excess elements in array initializer [-Werror]
{DRAW,365,260},{DRAW,360,260}};
^
prog.c:56:20: note: (near initialization for ‘figure’)
prog.c: In function ‘main’:
prog.c:80:10: error: ‘j’ undeclared (first use in this function)
for (j=0;j<N;j++)
^
cc1: all warnings being treated as errors