I'm 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 path
variable :
char path[64];
Why I'm seeing this error? And how can I solve it ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…