Answer the question
In order to leave comments, you need to log in
Navigating through a text file?
It is necessary to organize movement on a file.
For example, lines are read up to a certain point, and then you need to read a line higher from the same file.
And so many times.
What for? I am writing an interpreter for my little language.
Before that, I just read everything into std::vector, but storing large files in RAM seems kind of bad. What can be used here?
Answer the question
In order to leave comments, you need to log in
If you are afraid to read entire files, you can use the memory-mapped file mechanism.
I have nothing to say specifically on this issue, but I can advise you to read the Book of the Dragon .
When designing things like this, very helpful.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question