Language: C

int spfa_bfs(int s)  
{  
    queue <int> q;  
    memset(d,0x3f,sizeof(d));  
    d[s]=0;  
    memset(c,0,sizeof(c));  
    memset(vis,0,sizeof(vis));  
  
    q.push(s);  vis[s]=1; c[s]=1;  
    //??¶?????\???vis???????????°????????????????????¶????????\????¬???°  
    int OK=1;  
    while(!q.empty())  
    {  
        int x;  
        x=q.front(); q.pop();  vis[x]=0;  
        //?????´????´????????????¶????¶?????????°  
        for(int k=f[x]; k!=0; k=nnext[k]) //????????¶???x????????\??¨  
        {  
            int y=v[k];  
            if( d[x]+w[k] < d[y])  
            {  
                d[y]=d[x]+w[k];  //??????  
                if(!vis[y])  //??¶???y?????¨??????  
                {  
                    vis[y]=1;    //?????°  
                    c[y]++;      //???????¬???°  
                    q.push(y);   //??\???  
                    if(c[y]>NN)  //?¶??????\????¬???°???????????´???????´????  
                        return OK=0;  
                }  
            }  
        }  
    }  
  
    return OK;  
  
} 

Compiler output:
main.c: In function 'spfa_bfs':
main.c:3:5: error: 'queue' undeclared (first use in this function)
    3 |     queue <int> q;
      |     ^~~~~
main.c:3:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:3:12: error: expected expression before 'int'
    3 |     queue <int> q;
      |            ^~~
main.c:4:5: error: implicit declaration of function 'memset' [-Wimplicit-function-declaration]
    4 |     memset(d,0x3f,sizeof(d));
      |     ^~~~~~
main.c:1:1: note: include '<string.h>' or provide a declaration of 'memset'
  +++ |+#include <string.h>
    1 | int spfa_bfs(int s)
main.c:4:5: warning: incompatible implicit declaration of built-in function 'memset' [-Wbuiltin-declaration-mismatch]
    4 |     memset(d,0x3f,sizeof(d));
      |     ^~~~~~
main.c:4:5: note: include '<string.h>' or provide a declaration of 'memset'
main.c:4:12: error: 'd' undeclared (first use in this function)
    4 |     memset(d,0x3f,sizeof(d));
      |            ^
main.c:6:12: error: 'c' undeclared (first use in this function)
    6 |     memset(c,0,sizeof(c));
      |            ^
main.c:7:12: error: 'vis' undeclared (first use in this function)
    7 |     memset(vis,0,sizeof(vis));
      |            ^~~
main.c:9:5: error: 'q' undeclared (first use in this function)
    9 |     q.push(s);  vis[s]=1; c[s]=1;
      |     ^
main.c:17:19: error: 'f' undeclared (first use in this function)
   17 |         for(int k=f[x]; k!=0; k=nnext[k]) //????????¶???x????????\??¨
      |                   ^
main.c:17:33: error: 'nnext' undeclared (first use in this function)
   17 |         for(int k=f[x]; k!=0; k=nnext[k]) //????????¶???x????????\??¨
      |                                 ^~~~~
main.c:19:19: error: 'v' undeclared (first use in this function)
   19 |             int y=v[k];
      |                   ^
main.c:20:22: error: 'w' undeclared (first use in this function)
   20 |             if( d[x]+w[k] < d[y])
      |                      ^
main.c:28:29: error: 'NN' undeclared (first use in this function)
   28 |                     if(c[y]>NN)  //?¶??????\????¬???°???????????´???????´????
      |                             ^~