#include<stdio.h>
#include<string.h>
char getInput(char *x[50]);
main (){
char string[50];
getInput(&string);
}
char getInput(char *x[50]){
printf("What is the string?");
gets(*x);
}
I keep getting these errors...
exer7.c:20:2: warning: passing argument 1 of ‘getInput’ from incompatible pointer type [enabled by default] getInput(&string); ^ exer7.c:5:6: note: expected ‘char *’ but argument is of type ‘char ()[50]’ char getInput(char *x[50]);
I've been changing the pointers and ampersands but I really don't know the proper pointer type, pls help :(
BTW, that's just a code snippet, I have many other user-declared functions I don't need to post here.