-
-
Save parzibyte/074cdf0e2e7aeb6be178e2001862d9c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void escribirListaEnArchivo() { | |
FILE *archivoSalida; | |
archivoSalida = fopen(nombreArchivoSalida, "w"); | |
if (archivoSalida == NULL) { | |
printf("El archivo %s no existe", nombreArchivoSalida); | |
return; | |
} | |
// Recorrer la lista... | |
struct nodo *temporal = superior; | |
while (temporal != NULL) { | |
char miCadena[MAXIMA_LONGITUD_LINEA] = ""; | |
// Arreglar el teclado descompuesto | |
arreglarTexto(temporal->linea, miCadena); | |
// Y escribir en el otro archivo | |
printf("Escribiendo la cadena %s\n", miCadena); | |
fprintf(archivoSalida, "%s\n", miCadena); | |
// Avanzamos en la lista | |
temporal = temporal->siguiente; | |
} | |
fclose(archivoSalida); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment