well, j s8 une debutante as well, mais j vais pas abondonner la programmation!! mayby i'm not having l'encadrement necessaire, but any way, now i have an exam comming nd i need to know max!! j'avou there were som dumb mistakes, i've made somechanges, l'execution marche bien au bedut mais quand tu rentre la 5ém chaine, bin access violation as u say! if u can correct it plz do it nd thnx ::
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include<string.h>
int lecture(char **tabch,char *ch)
{
int i;
printf("donner une chaine\n" );
ch=(char*)malloc(100);
gets(ch);
i=0;
while(strcmp(ch,"fin" )!=0)
{
tabch=(char**)malloc(sizeof(char));
*(tabch+i)=ch;
(ch)=(char*)malloc(sizeof(char));
printf("donner une autre chaine\n" );
gets(ch);
puts(*(tabch+i));
i++;
}
return(i);}
void main()
{
char **tabch;
char *ch;
int x;
clrscr();
x=lecture(tabch,ch);
printf("%d",x);
getch();
}