Click here to Skip to main content
16,017,502 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: simple problem Pin
Software_Specialist3-Jun-07 5:10
Software_Specialist3-Jun-07 5:10 
Questioncode to search in a text file Pin
non light3-Jun-07 3:10
non light3-Jun-07 3:10 
AnswerRe: code to search in a text file Pin
CPallini3-Jun-07 3:52
mveCPallini3-Jun-07 3:52 
GeneralRe: code to search in a text file Pin
non light3-Jun-07 4:04
non light3-Jun-07 4:04 
GeneralRe: code to search in a text file Pin
Hans Dietrich3-Jun-07 4:19
mentorHans Dietrich3-Jun-07 4:19 
GeneralRe: code to search in a text file Pin
non light3-Jun-07 4:39
non light3-Jun-07 4:39 
GeneralRe: code to search in a text file Pin
Christian Graus3-Jun-07 11:22
protectorChristian Graus3-Jun-07 11:22 
GeneralRe: code to search in a text file Pin
CPallini3-Jun-07 10:16
mveCPallini3-Jun-07 10:16 
non light wrote:
I hope you understand me


Yes, now it is clear.

If you wants to keep things simple, the probably you have to:
(1) read the whole file in memory.
(2) search the memory for the three words pattern (you can search for the hyphen, using, for instance, <code>strchr</code>).


The above is a simple approach, feasible for small text files.
If you have troubles on the details of the depicted steps, don't ask to post your doubts.
Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

AnswerRe: code to search in a text file Pin
Hamid_RT3-Jun-07 7:33
Hamid_RT3-Jun-07 7:33 
QuestionHeap corruption. Pin
Polite Programmer3-Jun-07 1:26
Polite Programmer3-Jun-07 1:26 
AnswerRe: Heap corruption. Pin
Gary R. Wheeler3-Jun-07 1:44
Gary R. Wheeler3-Jun-07 1:44 
GeneralRe: Heap corruption. Pin
Polite Programmer3-Jun-07 1:47
Polite Programmer3-Jun-07 1:47 
GeneralRe: Heap corruption. Pin
Polite Programmer3-Jun-07 1:57
Polite Programmer3-Jun-07 1:57 
GeneralRe: Heap corruption. Pin
Gary R. Wheeler3-Jun-07 1:59
Gary R. Wheeler3-Jun-07 1:59 
GeneralRe: Heap corruption. Pin
CPallini3-Jun-07 3:47
mveCPallini3-Jun-07 3:47 
AnswerRe: Heap corruption. Pin
Matthew Faithfull3-Jun-07 3:08
Matthew Faithfull3-Jun-07 3:08 
AnswerRe: Heap corruption. Pin
CPallini3-Jun-07 3:48
mveCPallini3-Jun-07 3:48 
AnswerRe: Heap corruption. Pin
Stephen Hewitt3-Jun-07 14:08
Stephen Hewitt3-Jun-07 14:08 
GeneralRe: Heap corruption. Pin
Polite Programmer3-Jun-07 20:00
Polite Programmer3-Jun-07 20:00 
GeneralRe: Heap corruption. Pin
Polite Programmer3-Jun-07 20:01
Polite Programmer3-Jun-07 20:01 
GeneralRe: Heap corruption. Pin
Stephen Hewitt3-Jun-07 20:05
Stephen Hewitt3-Jun-07 20:05 
Questionhelp with fstream Pin
anbluemoon3-Jun-07 1:24
anbluemoon3-Jun-07 1:24 
AnswerRe: help with fstream Pin
CPallini3-Jun-07 4:02
mveCPallini3-Jun-07 4:02 
QuestionDLL and EXE files Pin
prithaa3-Jun-07 0:43
prithaa3-Jun-07 0:43 
AnswerRe: DLL and EXE files Pin
Christian Graus3-Jun-07 1:14
protectorChristian Graus3-Jun-07 1:14 

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.