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 usingfgets to fill strings[i] with a line. For example:
int i;
for ( i = 0; i < size; i++ )
fgets ( strings[i], LENGTH, stdin );
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401