Never use gets. It's impossible to make gets safe. All you need to do is match declarations:
char strings[N][LENGTH];
...
void f ( char strings[N][LENGTH], int size );
Then it's just a matter of counting from 0 to size - 1 and using
fgets to fill strings[i] with a line. For example:
int i;
for ( i = 0; i < size; i++ )
fgets ( strings[i], LENGTH, stdin );
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Offline 11,807 posts
since Sep 2004