I'm supposed to use getline to read in a joustdata.txt, and to ensure that the numbers read from the file are converted to integers, I'm supposed to add 99 to each number printed out. The joustdata.txt file looks like this:
I want to do it with a loop rather than typing in getline for each string.
the problem I have is that my code skips over the newline and doesn't print starry. What can I do to fix it, any pointer is appreciated thanks:)
Thank you for responding so quickly. So would I keep everything else the same and just add a new loop on top? and if so when I try to compile it gives me an incomplete type error.
error:variable 'std::istringstream is' has initializer but incomplete type
istringsream is (s);
^