This is really easy in some languages, not so easy in others. I can’t quite get it for C++. I’m reading in a file with thousands of lines of the format in the question title, and reading the file over and over again thousands of times.
Basically, I have some integers in mind in my program, say “100, 4, 1“, and I want to look up in a text file what the last digit in the sequence is, so the line might be “100_4_1 - 15“, i want to get the 15. How can this be done?
1 Answer