Hey Guys,
I am comparing two files and for every line that is the same, I am putting a star in front of it and putting it in a new file. However, for some reason it isn't working for me. Any ideas of what's wrong?
Any help would be much appreciated! Thank you!Code:char one[2048]; char two[2048]; while (fgets(two, 2048, fileB) != NULL){ while (fgets(one, 2048, fileA) != NULL){ if (strncmp (one, two, 2048) == 0){ fprintf(fileC, "*%s", two); } } }