Search found 79 matches
- Thu Sep 25, 2008 11:45 am
- Forum: C++ Development
- Topic: Read text file backwards
- Replies: 22
- Views: 3655
The problem is that the log entry has variable length. I'll try to write something on my own using C++ file I/O functions even though I'm not really good (enough) in this field. Probable solution would be to read character by character backwards from EOF by decreasing the bytes each time and scan fo...
- Thu Sep 25, 2008 11:21 am
- Forum: C++ Development
- Topic: Read text file backwards
- Replies: 22
- Views: 3655
- Thu Sep 25, 2008 10:44 am
- Forum: C++ Development
- Topic: Read text file backwards
- Replies: 22
- Views: 3655
Thanks for the thoughts. Yeah, wxTextFile has very nice functions but I will really need a solution for big log files without loading them into memory first. The thing is that depending on the needed date span I will need to get let say only the 30 last lines of the file, for example the logged deta...
- Thu Sep 25, 2008 12:27 am
- Forum: C++ Development
- Topic: Read text file backwards
- Replies: 22
- Views: 3655
Read text file backwards
Hello All: I'm trying to find a way to read a big text file backwards from the EOF, line by line, without loading the whole file into memory first. wxTextOutputStream is good for reading a file line by line in the case when we need to start at the begging of the file. I'm having a hard time finding ...