the compiler show bunch of error during the strcpy and strcmp function and i don't understand whyCode:void modifyStaff() { char ans, cont, staid[20], name[25], position[20]; int i = 0, pCount, modiCount = 0,salary,found; staff P[20]; FILE*fp; fp = fopen("staff.dat", "rb"); while (fread(&P[i], sizeof(staff), 1, fp)) i++; pCount = i; fclose(fp); do { printf("\nEnter ID of the Staff to be modified : "); rewind(stdin); scanf("%s", staid); found = 0; printf("\nID NAME POSITION SALARY \n"); printf("============ =========== ======= \n"); for (i = 0; i < pCount; i++) { if (strcmp(staid, P[i].id) == 0) { found = 1; printf("%-18d %-10s %-10s %-10d \n", P[i].id, P[i].name, P[i].salary, P[i].salary); printf("\n Updated Name:"); scanf("%[^\n]", name); printf("\n Updated Position:"); rewind(stdin); scanf("%[^\n]", position); printf("\n Updated salary:"); rewind(stdin); scanf("%d", salary); printf("Confirm to Modify (Y=yes)? "); rewind(stdin); scanf("%c", &ans); if (toupper(ans) == 'Y') { P[i].id = staid; strcpy(P[i].name, name); strcpy(P[i].position, position); strcpy(P[i].salary, salary); modiCount++; } printf("Updated Staff Records:\n"); printf("\nID NAME POSITION SALARY\n"); printf("======== ========= =========== ========\n"); printf("%-18d %-10s %-10s %-10d", P[i].id, P[i].name, P[i].position, P[i].salary); } } if (!found) printf("NO record founded with ID =%d\n", staid); printf("Any more record to modify?(Y=yes)?"); rewind(stdin); scanf("%c", &cont); } while (toupper(cont) == 'Y'); fp = fopen("staff.dat", "wb"); for (i = 0; i < pCount; i++) fwite(&P[i], sizeof(staff), 1, fp); fclose(fp); printf("\n\t%d Record(s) modified.\n\n", modiCount); }