I have a large file and I need to get only the last line from it (\n only is the line separator).
I need this to be done on iOS device, so it cannot take much memory or cpu time (like reading the whole file).
How can I do this in either Objective-C,c++ or c++11?
I have a large file and I need to get only the last line
Share
I have the feature in my production code.The idea is that try to read the last line by seeking and reading.Take a look please.