Click here to Skip to main content
15,917,568 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: What is the function of the statement "(*(long*)0) = 0;" ? Pin
George222-Jan-03 2:58
George222-Jan-03 2:58 
AnswerRe: What is the function of the statement "(*(long*)0) = 0;" ? Pin
Daniel Turini22-Jan-03 2:50
Daniel Turini22-Jan-03 2:50 
GeneralRe: What is the function of the statement "(*(long*)0) = 0;" ? Pin
George222-Jan-03 2:57
George222-Jan-03 2:57 
GeneralInitialization of toolbars, dialogs at the launch of an application Pin
loic22-Jan-03 2:34
loic22-Jan-03 2:34 
GeneralRe: Initialization of toolbars, dialogs at the launch of an application Pin
Rage22-Jan-03 2:42
professionalRage22-Jan-03 2:42 
General(thank you) Re: Initialization of toolbars, dialogs at the launch of an application Pin
loic22-Jan-03 3:23
loic22-Jan-03 3:23 
GeneralRead backwards - CSV file Pin
Dave_22-Jan-03 2:32
Dave_22-Jan-03 2:32 
GeneralRe: Read backwards - CSV file Pin
Daniel Turini22-Jan-03 2:40
Daniel Turini22-Jan-03 2:40 
Dave_ wrote:
Is there a better way to read backward - line by line? I am currently reading one byte at a time until I see the \n character. Once I'm there, I keep reading until I see 2 comma characters.

You need to use buffering, then reading will be block by block, then searching for the last \n will be faster, but it will still be slow. See the tac unix implementation (hey, it's GPL'ed it should be easy to find it) for a sample good performing implementation. If you don't know, cat is the unix command like the "type" on DOS, and tac is the command that do it backwards.

Approach 2: Since (it seems) you are only appending to the file it's easy to keep a (binary) index file with the position of the lines.


I see dumb people
GeneralRe: Read backwards - CSV file Pin
David Chamberlain22-Jan-03 6:30
David Chamberlain22-Jan-03 6:30 
QuestionFilesize? Pin
Dov Sherman22-Jan-03 2:09
Dov Sherman22-Jan-03 2:09 
AnswerRe: Filesize? Pin
chepuri_uk22-Jan-03 2:15
chepuri_uk22-Jan-03 2:15 
AnswerRe: Filesize? Pin
Jörgen Sigvardsson22-Jan-03 2:19
Jörgen Sigvardsson22-Jan-03 2:19 
AnswerRe: Filesize? Pin
Abin22-Jan-03 2:32
Abin22-Jan-03 2:32 
GeneralRe: Filesize? Pin
Dov Sherman22-Jan-03 2:38
Dov Sherman22-Jan-03 2:38 
GeneralI´m looking for Icons and Bitmaps for the Toolbar Pin
strizi22-Jan-03 2:06
strizi22-Jan-03 2:06 
GeneralRe: I´m looking for Icons and Bitmaps for the Toolbar Pin
Nitron22-Jan-03 6:07
Nitron22-Jan-03 6:07 
Generallook the Internet for "Glyphs" Pin
strizi22-Jan-03 18:47
strizi22-Jan-03 18:47 
QuestionIs there a workaround for this? Pin
Jörgen Sigvardsson22-Jan-03 1:46
Jörgen Sigvardsson22-Jan-03 1:46 
AnswerRe: Is there a workaround for this? Pin
Joaquín M López Muñoz22-Jan-03 6:39
Joaquín M López Muñoz22-Jan-03 6:39 
GeneralRe: Is there a workaround for this? Pin
Jörgen Sigvardsson22-Jan-03 10:18
Jörgen Sigvardsson22-Jan-03 10:18 
General0xC0000005:Acces violation Pin
Geert Craessaerts22-Jan-03 0:06
Geert Craessaerts22-Jan-03 0:06 
GeneralRe: 0xC0000005:Acces violation Pin
xxhimanshu22-Jan-03 0:22
xxhimanshu22-Jan-03 0:22 
GeneralRe: 0xC0000005:Acces violation Pin
RChin22-Jan-03 0:24
RChin22-Jan-03 0:24 
GeneralRe: 0xC0000005:Acces violation Pin
Ted Ferenc22-Jan-03 1:29
Ted Ferenc22-Jan-03 1:29 
GeneralRe: 0xC0000005:Acces violation Pin
joshfl23-Jan-03 5:42
joshfl23-Jan-03 5:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.