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