here is my code
void init_emps() {
emp_count = 3;
emps = (emp*)malloc(sizeof(emp) * emp_count);
if (emps == NULL) {
printf("could not malloc emps array");
return 0;
}
else {
add_emp();
print_emps();
}
}
void add_emp() {
if (emps != NULL) {
//emp_count++;
//emps = realloc(emps, sizeof(emp) * emp_count);
emp em = { "doon", 18 };
emps[emp_count-1] = em;
}
}
void print_emps() {
for (int i = 0; i < emp_count-1; i++) {
puts(emps[i].name);
}
}``` i get this error ```Exception thrown at 0x00007FF87F337CA0 (ucrtbased.dll) in bankSystem.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.``` i get it when i try to print my emps does anyone know how to fix this?