i've created a struct "Employee"
#define MAX_SIZE 20
typedef struct Employee{
char name[MAX_SIZE];
int s;
int e;
} employee_s;
and i need to create an array of 2 employees and ask the user to initialize them, nothing i try seem to work,
void main()
{
int i, s, e;
char name[10];
Employee* e[3];
*e = (Employee*)malloc(sizeof(Employee)*ARR_SIZE);
for(i=0; i < 3; i++)
{
fflush(stdin);
puts("Please enter Employee's name:");
scanf("%c",&name);
*e[i]->name = name;
puts("Please enter Employee's salary:");
scanf("%d",&s);
*e[i]->s= s;
puts("Please enter Employee's experience:");
scanf("%d",&e);
*e[i]->e=e;
}
}
p.s: i dont have to use dynamic allocation,
what do i do wrong?
thank you!