I am getting an infinite loop for some reason. It should just read until the end of the line but for some reason it reads the entire file then hits an infinite loop on the last character.
input file:
()
{}[]()
<<>><>
{[[[[]]]]}
This is just the function that I am calling and I just need to read in one line at a time so I'm just trying to get it to read the first line for now.
The way I have the code written it should stop when it reaches a new line but it doesn't.