The problem is that I don't actually know hot to deal with array of pointers, the way I do it, it pass to the position of the array the address, and so I got always in every position, the last input. But if I use the *operator, it only pass the first character.. so how I do it??
int main( void ) {
void prompt_str( const char *str[], char *const copy ); //prototype
const char *str[ 20 ]= { '\0' };
const char *copy= 0;
//prompt stringa
prompt_str( str, © );
} //end main
void prompt_str( const char *str[], char *const copy ) { //definition
size_t n_str= 0, i= 0;
do {
printf( "Insert a string\n:" );
fgets( copy, 100, stdin );
i= ( strlen( copy )- 1 ); //get length
copy[ i ]= '\0'; //remove \n
str[ n_str++ ]= copy; //put string into pointer of array
} while ( n_str< 3 );
}