bidule chose1; => chose1.bibi; bidule* chose2; => (*chose2).bibi ou chose2->bibi
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionstruct titre { int nombre; char naz[200]; char nav[200]; };
struct titre *li; li = (struct titre *)malloc(1*sizeof(*li)); lectureInt(fichier, li[0].nombre); lecture(fichier, li[0].naz); printf("blblb : %d \n %s \n", li[0].nombre, li[0].naz);
#include <stdio.h> #include "conversionAsciiNombre.h" void lectureInt(FILE *fichier, int *nom) { int l; *nom=0; printf("%d\n",(*nom)); while( (l=fgetc(fichier)) != 9 ) { *nom=((*nom)*10)+conversionAsciiNombre(l); printf("%d \t", (*nom)); } }
#include <stdio.h> void lecture(FILE *fichier, char *nom) { int l; int j=0; while( (l=fgetc(fichier)) != 10 ) { *(nom+j)=l; j++; } *(nom+j)=0; }
#include <stdio.h> void lecture(FILE *fichier, char *nom) { int l; int j=0; while( (l=fgetc(fichier)) != 10 ) { *(nom+j)=l; j++; } *(nom+j)=0; }
type i; type *p; p = &i;
Est-ce que lorsque l'on fait &variable, pour la machine ca revient a lui declarer implicitement un pointeur vers 'type de ma variable' qui repere cette variable
lectureInt(fichier, &li[0].nombre);
int* i = &li[0].nombre; lectureInt(fichier, i);