I am trying to create my own breaks in a .txt file so that my program will stop reading the file when it encounters this break. It works, but it will still output the "*" (break character) before stopping. Is there a way to exclude the break character from being output when running the program? Here is the code snippet that opens the file, reads to the break, and outputs the data:
Just had to add an if statement to check the string before the cout operation. Not sure if anyone will ever need to know this, but here is the code that works: