You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
SAE-2.02/code/p1e3.c

33 lines
656 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/**
* SAE 2.02 - Exploration algorithmique dun problème
* Prtie 1 / Exercice 3
* Extrait code C
*/
#define NAME_MAX_LEN 40
#define NB_PTS_CARACT_MAX 10
typedef struct pointCaracteristique {
char nom[NAME_MAX_LEN];
struct pointCaracteristique **tPtsCaract;
int nbPtsCaract;
} PointCaracteristique, *Rue;
PointCaracteristique *reseau[NB_PTS_CARACT_MAX];
// BUT: Savoir si B est directement accessible depuis A
int isAccessDirect(PointCaracteristique *A, PointCaracteristique *B)
{
for (int i = 0; i < A->nbPtsCaract; i++)
{
if (A->tPtsCaract[i] == B)
{
return 1;
}
}
return 0;
}