file merge line by line [in c]
Go to solution
Solved by iWearKiltz,
See my edit. Try using a logical OR instead of AND
the OR came up with an interesting file lol - definitely wrong. however you gave me an epiphany
attempting some things now, thanks for replying
To solve the issue of one file not being completely read, i added a few lines of code afterwards:
while ((fgets(x, 999, file_in) != 0)) fprintf(file_out, "%s", x);while ((fgets(y, 999, file_in2) != 0)) fprintf(file_out, "%s", y);
This meant that if the individual statements alone weren't at the end, they would continue to write to the file. SUCCESS!!
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now