it is a old code . i have a syntactic problem here...
Code:
int n;
char buf[81];
char (*lines)[81]; // what is the meaning of this syntax ? line -1
/* fopen fin and such */
n = 0;
while ( fgets ( buf, sizeof buf, fin ) != NULL ) {
n++;
}
lines = malloc ( n * sizeof *lines );
rewind ( fin );
n = 0;
while ( fgets ( buf, sizeof buf, fin ) != NULL ) {
strcpy ( lines[n++], buf );
}
look at //line -1 . i have question on char (*lines)[81]; i dont understand the meaning of this syntax. what is the meaning of this ?
why there is a paranthesis ?
what is the alternate version of that ?
thanks