foo.cc: In function 'node* insert(node*, int)':
foo.cc:50:15: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   50 |         if (i = head)
      |             ~~^~~~~~
foo.cc: In function 'int main()':
foo.cc:60:16: warning: unused variable 'i' [-Wunused-variable]
   60 |         int n, i, t;
      |                ^
foo.cc:62:30: warning: unused variable 'p' [-Wunused-variable]
   62 |         node* head = NULL, * p = NULL;
      |                              ^
foo.cc: In function 'node* insert(node*, int)':
foo.cc:57:1: warning: control reaches end of non-void function [-Wreturn-type]
   57 | }
      | ^
   
  
    [Hydro](https://hydro.ac)提供评测服务