Homework problem regarding files in C++
Write a program that merges the numbers in two files and writes all the numbers into a third file. Each input file contains a list of numbers of type int in sorted order from the smallest to the largest. After the program is run, the output file will contain all the numbers in the two input files in one longer list in sorted order from smallest to largest. Your program should define a function that is called with the two input file streams and the output file stream as three arguments. Here's what I have so far: https://code.sololearn.com/cqoCfIMDtmCu/#cpp My problem is that when it outputs into the third file, it it only reads about 4/5 both of the input files then breaks out of the do-while loop. How can I get it to read all the way through both input files?