Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- typedef char * str ;
- void affiche(char * mots[]){
- while (*mots) puts(* (mots++));
- }
- int main(int k, const str ldc[]){
- char *mots[] = {"ab", "cd", "ed", NULL};
- // La ligne ci dessous renvoie l'erreur :
- // lvalue required as increment operand
- // alors que c'est exactement celle qui est dans la fonction affiche
- // while (*mots) puts(* mots++);
- // De même ça fonctionne parfaitement pour afficher
- // le tableau de chaines de la ligne de commande
- while (*ldc) puts( *ldc++);
- affiche(mots);
- return 0 ;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement