so I have a text file that contains formatted information as shown below.
100
4,2
3
5,1
I am trying to use the getline()
function to read in each line, and then determine if that line has one or two numbers. My question is, How do I check if the line has two number or one? It would involve checking for a comma, but I have no idea on how to do so.
Thanks