I am creating a program using C, and I have this line in my code:
scanf("%s", &path);
When I compile the source file, I get this warning:
main.c:84:2: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘char (*)[64]’ [-Wformat]
And this is the declaration for the variable path:
char path[64];
Why am I seeing this error? And how can I solve it?
source
share