rendered paste body#include <stdio.h>
#include <string.h>
#define LINE_LENGTH 80
int main (void)
{
int count = 0;
FILE *origfile, *errorfile;
char line[100];
char array[100][100];
origfile = fopen("mdata.txt", "r"); /* mode = read */
if(origfile == NULL)
printf("Fehler beim Oeffnen des Originals");
else{
errorfile = fopen("errorfile.txt", "w"); /* mode = write */
if(errorfile == NULL)
printf("Fehler beim Oeffnen der Error.txt");
else{
while(fgets(line, 100, origfile) != NULL)
count++;
fclose(origfile);
origfile = fopen("mdata.txt", "r"); /* mode = read */
/* bitte hier die funktion rein wie ich alles in einzelne strings speichern kann */
printf("\n");
}
printf("Die Originalfile enthaelt: %d Zeilen\n", count);
}
// Trennen der Strings
}