I have a program that reads a list of assignments and removes the "bad" assignments, then writes into a new file. My function that removes the bad assignments works correctly. The code I currently am using to read the text file works correctly also, but is doing so with a while loop. How can I utilize the std::list library to accomplish the same thing without the while loop? Below is the code I am using for the removing of the bad assignments (Prune) along with reading the text file.