i am scanning a input file and storing it to a string array.
char *station[][MAX]={0};
int scount=0;
do {
station[scount]=gets(sstr);
scount++;
} while (strcmp("####",sstr) != 0);
when i print out my array.. it is overwritten with "####"
for(i=0;i<scount;i++) {
printf("%s\n" station[i]);
}
this is my output.
####
####
####
####
####
####
####
####
i try to fix this by making my array to a 2x2 array.. but i can't get it to work correctly.. could someone help me??