include #include #define MAX 24 typedef struct historialEmp { char mes[20]; int demanda; int personal; int ganancias; int inventario; } Hist; Hist leer(); void leermes(Hist m[MAX], int n); void writeMo(Hist m[MAX],int n); void despmon(struct historialEmp m[MAX]); void verhistorico(struct historialEmp m[MAX]); int main ( ) { Hist m[MAX]; int n=MAX, i; // lee lo que esta en archivo //leeDatos(p,MAX); //despliegaDatos(p); // inicializa datos for(i=0;i 0) printf("registro leido\n"); } } void writeMo(Hist m[MAX],int n) { FILE * historico; int tam, i; historico = fopen("datos", "wb"); if (historico == NULL) { printf("error al abrir el archivo\n"); exit(1); } for(i=0;i 0) printf("registro escrito\n"); } } void verhistorico(struct historialEmp m[MAX]) { int i; printf("\tMes Demanda Personal Ganancias Inventario\n"); for(i=0; i
Aucun commentaire:
Enregistrer un commentaire