foo.c:3:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
include<cstdio>
^
foo.c: In function 'main':
foo.c:7:1: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
scanf ("%d%d%d",&n ,&s ,&t);
^
foo.c:7:1: warning: incompatible implicit declaration of built-in function 'scanf' [enabled by default]
foo.c:7:18: error: 'n' undeclared (first use in this function)
scanf ("%d%d%d",&n ,&s ,&t);
^
foo.c:7:18: note: each undeclared identifier is reported only once for each function it appears in
foo.c:7:22: error: 's' undeclared (first use in this function)
scanf ("%d%d%d",&n ,&s ,&t);
^
foo.c:7:26: error: 't' undeclared (first use in this function)
scanf ("%d%d%d",&n ,&s ,&t);
^
foo.c:8:1: error: 'for' loop initial declarations are only allowed in C99 mode
for (int i=1; i<=n; i++) {
^
foo.c:8:1: note: use option -std=c99 or -std=gnu99 to compile your code
foo.c:9:15: error: 'd' undeclared (first use in this function)
scanf("%d" ,& d );
^
foo.c:10:15: error: 'f' undeclared (first use in this function)
scanf("%d" ,& f[d]);
^
foo.c:12:1: error: 'N' undeclared (first use in this function)
N[ f [ d ] ] += 1 ;
^
foo.c:13:16: error: 'l' undeclared (first use in this function)
while(q!='\n'){l[d]+=1; scanf("%c",&q); }
^
foo.c:15:5: error: redefinition of 'i'
int i=t; a-=N[t]; b =l[t];
^
foo.c:8:10: note: previous definition of 'i' was here
for (int i=1; i<=n; i++) {
^
foo.c:15:10: error: 'a' undeclared (first use in this function)
int i=t; a-=N[t]; b =l[t];
^
foo.c:15:19: error: 'b' undeclared (first use in this function)
int i=t; a-=N[t]; b =l[t];
^
foo.c:16:15: error: 'c' undeclared (first use in this function)
while ( i ) { c[i] =1; i =f[i]; }
^
foo.c:19:1: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
printf("%d\n%d",b,a);
^
foo.c:19:1: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
foo.c:20:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^