Click here to Skip to main content
15,896,915 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to calculate total line number of a text file Pin
Hamid_RT11-Mar-09 3:20
Hamid_RT11-Mar-09 3:20 
GeneralRe: How to calculate total line number of a text file Pin
CPallini11-Mar-09 3:40
mveCPallini11-Mar-09 3:40 
GeneralRe: How to calculate total line number of a text file Pin
Michael Schubert11-Mar-09 4:23
Michael Schubert11-Mar-09 4:23 
GeneralRe: How to calculate total line number of a text file Pin
Hamid_RT11-Mar-09 7:48
Hamid_RT11-Mar-09 7:48 
GeneralRe: How to calculate total line number of a text file Pin
CPallini11-Mar-09 8:16
mveCPallini11-Mar-09 8:16 
GeneralRe: How to calculate total line number of a text file Pin
Hamid_RT12-Mar-09 20:00
Hamid_RT12-Mar-09 20:00 
AnswerRe: How to calculate total line number of a text file Pin
David Crow11-Mar-09 3:17
David Crow11-Mar-09 3:17 
GeneralRe: How to calculate total line number of a text file Pin
Code-o-mat11-Mar-09 7:08
Code-o-mat11-Mar-09 7:08 
Or he could do the "inbetween" solution, create a buffer of some size and read as much of the file into it as he can, start counting and when he runs out of the buffer he can read more of the file in and continue with the same buffer starting from its beginning. This is much much much faster than reading char by char or line by line even, it will handle large files, but it won't eat up every bit of memory it finds hanging around the data bus "just chillin', wathching the game, having a beer". Smile | :)

> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <

AnswerRe: How to calculate total line number of a text file Pin
Hamid_RT11-Mar-09 3:19
Hamid_RT11-Mar-09 3:19 
AnswerRe: How to calculate total line number of a text file Pin
Stuart Dootson11-Mar-09 4:12
professionalStuart Dootson11-Mar-09 4:12 
QuestionSDI-appliction Pin
susanne111-Mar-09 2:52
susanne111-Mar-09 2:52 
AnswerRe: SDI-appliction Pin
David Crow11-Mar-09 2:58
David Crow11-Mar-09 2:58 
GeneralRe: SDI-appliction Pin
susanne111-Mar-09 3:09
susanne111-Mar-09 3:09 
GeneralRe: SDI-appliction Pin
David Crow11-Mar-09 3:12
David Crow11-Mar-09 3:12 
GeneralRe: SDI-appliction Pin
susanne111-Mar-09 3:30
susanne111-Mar-09 3:30 
GeneralRe: SDI-appliction Pin
David Crow11-Mar-09 3:41
David Crow11-Mar-09 3:41 
AnswerRe: SDI-appliction Pin
SandipG 11-Mar-09 4:12
SandipG 11-Mar-09 4:12 
QuestionMy second time to design a website... Pin
JackPuppy11-Mar-09 2:15
JackPuppy11-Mar-09 2:15 
AnswerRe: My second time to design a website... Pin
Hamid_RT11-Mar-09 3:23
Hamid_RT11-Mar-09 3:23 
GeneralRe: My second time to design a website... Pin
JackPuppy11-Mar-09 3:35
JackPuppy11-Mar-09 3:35 
GeneralRe: My second time to design a website... Pin
Hamid_RT11-Mar-09 7:49
Hamid_RT11-Mar-09 7:49 
GeneralRe: My second time to design a website... Pin
JackPuppy11-Mar-09 18:13
JackPuppy11-Mar-09 18:13 
AnswerRe: My second time to design a website... Pin
Stuart Dootson11-Mar-09 3:54
professionalStuart Dootson11-Mar-09 3:54 
QuestionUnordered Map Pin
CyanCrey11-Mar-09 1:52
CyanCrey11-Mar-09 1:52 
AnswerRe: Unordered Map Pin
Stuart Dootson11-Mar-09 3:52
professionalStuart Dootson11-Mar-09 3:52 

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.