foo.c:8:16: warning: 'struct Node' declared inside parameter list will not be visible outside of this definition or declaration
8 | int max(struct Node* head) {
| ^~~~
foo.c: In function 'max':
foo.c:10:13: error: 'INT_MIN' undeclared (first use in this function)
10 | int max=INT_MIN;
| ^~~~~~~
foo.c:3:1: note: 'INT_MIN' is defined in header '<limits.h>'; did you forget to '#include <limits.h>'?
2 | #include <malloc.h>
+++ |+#include <limits.h>
3 |
foo.c:10:13: note: each undeclared identifier is reported only once for each function it appears in
10 | int max=INT_MIN;
| ^~~~~~~
foo.c:11:25: warning: initialization of 'struct node *' from incompatible pointer type 'struct Node *' [-Wincompatible-pointer-types]
11 | struct node* prev = head;
| ^~~~
foo.c:12:24: warning: initialization of 'struct node *' from incompatible pointer type 'struct Node *' [-Wincompatible-pointer-types]
12 | struct node* cur = head;
| ^~~~
foo.c:11:18: warning: variable 'prev' set but not used [-Wunused-but-set-variable]
11 | struct node* prev = head;
| ^~~~
foo.c: In function 'main':
foo.c:62:15: warning: passing argument 1 of 'max' from incompatible pointer type [-Wincompatible-pointer-types]
62 | int x=max(head);
| ^~~~
| |
| struct node *
foo.c:8:22: note: expected 'struct Node *' but argument is of type 'struct node *'
8 | int max(struct Node* head) {
| ~~~~~~~~~~~~~^~~~
foo.c:63:15: warning: passing argument 1 of 'max' from incompatible pointer type [-Wincompatible-pointer-types]
63 | int y=max(head2);
| ^~~~~
| |
| struct node *
foo.c:8:22: note: expected 'struct Node *' but argument is of type 'struct node *'
8 | int max(struct Node* head) {
| ~~~~~~~~~~~~~^~~~
foo.c:67:5: error: expected declaration or statement at end of input
67 | return 0;
| ^~~~~~
[Hydro](https://hydro.ac)提供评测服务