Bonsoir,

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
struct sol{
  int v;
  int d;
};
 
int f(const void *a,const void *b)
{
  struct sol x=(sol*) a;
  struct sol y=(sol*) b;
  int rx=x.distance;
  int ry=y.distance;
  return (rx-ry);
}
Pourquoi après compilation ai-je ces erreurs :
error: expected expression before ‘)’ token
aux lignes struct sol x=(sol*) a; et struct sol y=(sol*) b;

Merci d'avance