So my programme is supposed to read characthers from a text file, but how do I end it? So my sequence of numbers ends with 0 and I want that to be enough to end the reading. But the programme prints "end of file while reading from file "data.txt""
any idea whats going on?
edit: I have a few negative numbers, but I expect that the counter will also count the - as a character, how can i stop it from doing that?
x = inName.readChar();
counter = counter + 1;
} while ( x != 0);