Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int nb_player=0;
- int i=1;
- player *tab=NULL;
- printf("Combien y a t il de joueur ");
- scanf("%d",&nb_player);
- tab=malloc(sizeof(player)*nb_player);
- for(;i<=nb_player;i++)
- {
- player joueur;
- char tempNom[15] = "";
- printf("Nom du joueur %d ",i);
- fgets(tempNom, sizeof(tempNom), stdin);
- joueur.nom=tempNom;
- clean(tempNom, stdin);
- tab[i-1]=joueur;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement