I am creating a menu that needs to take in an three inputs from the users.
char *fullname;
char *date;
float sal;
printf("
Enter full name: ");
line92
scanf("%s", &fullname);
printf("
Enter hire date: ");
Line 94
scanf("%s", &date);
printf("
Enter salary: ");
Line 96
scanf("%d", &sal);
These are the errors I am recieving
Employee.c:92: warning: format ‘%s’ expects type ‘char *’, but argument 2 has type ‘char **’
Employee.c:94: warning: format ‘%s’ expects type ‘char *’, but argument 2 has type ‘char **’
Employee.c:96: warning: format ‘%d’ expects type ‘int *’, but argument 2 has type ‘float *’
Can I get an explanation of what is causing these issues?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…