/in/foo.c:8:1: error: unknown type name 'Result'
Result calculate(float scores[], int size) {
^~~~~~
/in/foo.c:8:1: note: use 'struct' keyword to refer to the type
/in/foo.c: In function 'calculate':
/in/foo.c:9:5: warning: statement with no effect [-Wunused-value]
Result res;
^~~~~~
/in/foo.c:9:12: error: expected ';' before 'res'
Result res;
^~~
/in/foo.c:10:5: error: 'res' undeclared (first use in this function)
res.max = scores[0];
^~~
/in/foo.c:10:5: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c: In function 'main':
/in/foo.c:32:5: warning: statement with no effect [-Wunused-value]
Result result = calculate(scores, 10);
^~~~~~
/in/foo.c:32:12: error: expected ';' before 'result'
Result result = calculate(scores, 10);
^~~~~~
/in/foo.c:33:21: error: 'result' undeclared (first use in this function)
printf("%.2f ", result.max);
^~~~~~
/in/foo.c: In function 'calculate':
/in/foo.c:24:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^