Borderou de evaluare (job #1472520)

Utilizator BlaugranasEnal Gemaledin Blaugranas Data 17 august 2015 11:58:37
Problema Infasuratoare convexa Status done
Runda Arhiva educationala Compilator c | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.c:6:1: error: unknown type name ‘bool’ bool C(const void *a,const void *b) { ^ user.c: In function ‘C’: user.c:8:5: error: incompatible type for argument 2 of ‘A’ return A(v[1],&c,&d)<0; ^ user.c:5:8: note: expected ‘P’ but argument is of type ‘struct P **’ double A(P a,P b,P c) { return (b.x-a.x)*(c.y-a.y)-(c.x-a.x)*(b.y-a.y); } ^ user.c:8:5: error: incompatible type for argument 3 of ‘A’ return A(v[1],&c,&d)<0; ^ user.c:5:8: note: expected ‘P’ but argument is of type ‘struct P **’ double A(P a,P b,P c) { return (b.x-a.x)*(c.y-a.y)-(c.x-a.x)*(b.y-a.y); } ^ user.c: In function ‘main’: user.c:12:9: error: ‘pos’ undeclared (first use in this function) for(pos=i=1;i<=n;i++) ^ user.c:12:9: note: each undeclared identifier is reported only once for each function it appears in user.c:14:5: warning: implicit declaration of function ‘qsort’ [-Wimplicit-function-declaration] r=v[1],v[1]=v[p],v[p]=r,qsort(&v[2],n-1,sizeof(v),C),s[++t]=1; ^ user.c: In function ‘C’: user.c:9:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ user.c: In function ‘main’: user.c:11:12: warning: ignoring return value of ‘freopen’, declared with attribute warn_unused_result [-Wunused-result] freopen("infasuratoare.in","r",stdin),freopen("infasuratoare.out","w",stdout),scanf("%d",&n); ^ user.c:11:50: warning: ignoring return value of ‘freopen’, declared with attribute warn_unused_result [-Wunused-result] freopen("infasuratoare.in","r",stdin),freopen("infasuratoare.out","w",stdout),scanf("%d",&n); ^ user.c:11:88: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] freopen("infasuratoare.in","r",stdin),freopen("infasuratoare.out","w",stdout),scanf("%d",&n); ^ user.c:13:14: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] scanf("%lf%lf",&v[i].x,&v[i].y),p=v[i].x<v[p].x||(v[i].x==v[p].x&&v[i].y<v[p].y)?i:p; ^

Ceva nu functioneaza?