char *searcharray = malloc(size); for (i = 0; i < size; i++) { fscanf(filePtr, "%c", searcharray[i]); }
Here is my code. And Everytime i keep getting the warning message:
warning: format '%c' expects argument of type 'char *', but argument 3 has type 'int'
How is the variable searcharray being determined as an int?
(searcharray + i)
– ciphermagichar*
in scanf, it " Matches a sequence of characters whose length is specified by the maximum field width (default 1); the next pointer must be a pointer to char, ..." – Adrian Ratnapala