Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //* CARGAR A ARCHIVO NO ATENDIDOS *//
- void cargar_arch_noaten(listaP P){
- FILE *fp;
- fp = fopen("noatendidos.txt","a+");
- if(fp == NULL){
- printf("No se pudo abrir el archivo\n");
- } else
- if(emptyP(P)==1){
- printf("Lista Vacia\n");
- }
- else {
- int i=0;
- resetP(&P);
- char separacion[] = "******************************************";
- while(oosP(P)==0){
- if(mostrar_solo_hora_aten(copyP(P))==24){
- fprintf(fp,"%s\n",separacion);
- fprintf(fp,"Nombre y Apellido: %s %s\n", mostrar_nom(copyP(P)),mostrar_ape(copyP(P)));
- fprintf(fp, "Edad: %d\n", mostrar_edad(copyP(P)));
- fprintf(fp, "DNI: %d\n", mostrar_dni(copyP(P)));
- fprintf(fp, "Hora de ingreso: %d Hs %d Min\n", mostrar_ingreso(copyP(P)).hora, mostrar_ingreso(copyP(P)).minuto);
- i++;
- }
- forwardP(&P);
- }
- if(i==0){
- printf("No se encontraron pacientes NO ATENDIDOS para insertar en el archivo.\n");
- }
- else {
- printf("Se insertaron %d pacientes NO ATENDIDOS al archivo\n",i);
- }
- }
- fclose(fp);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement