I can' t stand any more...i need help...
Code:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
struct Employee{
int i;
int age;
char name[30];
};
void init(struct Employee *buf, int count){
int i;
for(i=0; i<count; i++){
printf("Please type a age between 20 and 65:\n");
scanf("%d", &(buf->age));
}
}
int main(int argc, char *argv[]){
int i, n;
struct Employee *buf;
n = atoi(argv[2]); // n einai to megethos tou pinaka
buf = (struct Employee *)malloc(n*sizeof(struct Employee));
/* Edw tha kalesoume tin synartisii */
init(buf, n);
system("pause");
return 0;
}