Hello,
I got program that opens a file for reading with fscanf putting the info into an array of structs, working fine so far.
This part looks like this:
Code:
/* snip */
fscanf(datei, "%s %d", &datensatz[z].fsname, &datensatz[z].grenze);
while(!feof(datei)){
z++;
fscanf(datei, "%s %d", &datensatz[z].fsname, &datensatz[z].grenze);
}
/* snip */
Such a text file contains a filesystem name and a number representing it's filling threshold like for example:
/usr 80
/home 70
/tmp 90
I now want to add comments into the textfile, beginning with a '#' and blank lines like for example:
# infile for tool platzcheck
# format: fsname threshold
/usr 80
/home 70
/tmp 90
Any ideas how I can implement this? Any help or just a little hint would be fine.
Thanks in forward!