Click here to Skip to main content
15,926,939 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: what is diff. btwn CSoket and CAsynsocket Pin
Jim Crafton23-Jul-05 4:33
Jim Crafton23-Jul-05 4:33 
GeneralRe: what is diff. btwn CSoket and CAsynsocket Pin
Rajesh match23-Jul-05 4:53
Rajesh match23-Jul-05 4:53 
QuestionHow to determine drag target Pin
dmitry_5822-Jul-05 4:00
dmitry_5822-Jul-05 4:00 
AnswerRe: How to determine drag source Pin
Alex_Y22-Jul-05 5:03
Alex_Y22-Jul-05 5:03 
GeneralRe: How to determine drag source Pin
dmitry_5822-Jul-05 5:18
dmitry_5822-Jul-05 5:18 
GeneralRe: How to determine drag source Pin
Alex_Y22-Jul-05 8:49
Alex_Y22-Jul-05 8:49 
GeneralRe: How to determine drag source Pin
dmitry_5825-Jul-05 3:04
dmitry_5825-Jul-05 3:04 
Generaloptimise text convertion Pin
fallologia22-Jul-05 3:22
fallologia22-Jul-05 3:22 
Hello!
My problem on C ++ is such:
In the program-text converter I use many times function Replace:

... <br />
        if(m_bVocView) m_sReadFromFile.Replace(" # "," \r\n "); <br />
        if(m_bVocView) m_sReadFromFile.Replace("\\\\ ","\r\n\r\n ");<br />
        if(m_bVocView) m_sReadFromFile.Replace("\\ ","\r\n ");<br />
        if(m_bVocView) m_sReadFromFile.Replace("\r\n~~~","");  <br />
....


As a result the program should read a file from the beginning up to the end many times. How to make all replacements on one fly?.. How to merge all this conditions into one single continuous and pretty program pass, for example:

        if (m_bVocView) <br />
        {<br />
         if ("\\\\ ")<br />
         {<br />
         m_sReadFromFile.Replace("\\\\ ","\r\n\r\n ");<br />
           if ("\\ ")<br />
           {<br />
           m_sReadFromFile.Replace("\\ ","\r\n ");<br />
           }<br />
...


How to determine, that the string for replacements can be one, another, the third and based on these variants to proceed the demand to the program to make that or another replacement by one pass?.. How to joint all variants (which are not superimposed against each other) in one line-up?..

OMG | :OMG: And the second part of this problem. To make replacements in a file I sequentially activate functions:
CreateFile
ReadFile
WriteFile

How to join all this functions onto one like as COPY or openURL? Is it possible to make replacements during function openURL for text file?..
GeneralRe: optimise text convertion Pin
David Crow22-Jul-05 3:33
David Crow22-Jul-05 3:33 
GeneralCompiled program won't run... Pin
Henrik Pettersson22-Jul-05 2:02
Henrik Pettersson22-Jul-05 2:02 
GeneralRe: Compiled program won't run... Pin
toxcct22-Jul-05 2:12
toxcct22-Jul-05 2:12 
GeneralRe: Compiled program won't run... Pin
Henrik Pettersson22-Jul-05 2:43
Henrik Pettersson22-Jul-05 2:43 
GeneralRe: Compiled program won't run... Pin
Trollslayer22-Jul-05 4:24
mentorTrollslayer22-Jul-05 4:24 
GeneralRe: Compiled program won't run... Pin
Henrik Pettersson22-Jul-05 5:04
Henrik Pettersson22-Jul-05 5:04 
GeneralRe: Compiled program won't run... Pin
David Crow22-Jul-05 5:58
David Crow22-Jul-05 5:58 
GeneralQuestions About CFtpFileFind Class Pin
jdnx22-Jul-05 0:30
jdnx22-Jul-05 0:30 
GeneralRe: Questions About CFtpFileFind Class Pin
Aamir Butt22-Jul-05 0:44
Aamir Butt22-Jul-05 0:44 
GeneralRe: Questions About CFtpFileFind Class Pin
jdnx22-Jul-05 12:45
jdnx22-Jul-05 12:45 
GeneralRe: Questions About CFtpFileFind Class Pin
David Crow22-Jul-05 3:36
David Crow22-Jul-05 3:36 
GeneralNetMessageBufferSend Pin
alextuan22-Jul-05 0:10
alextuan22-Jul-05 0:10 
GeneralRe: NetMessageBufferSend Pin
Nilesh K.22-Jul-05 0:17
Nilesh K.22-Jul-05 0:17 
GeneralVC++2003: Question about "Pointers to member functions". Pin
Maxwell Chen22-Jul-05 0:01
Maxwell Chen22-Jul-05 0:01 
GeneralRe: VC++2003: Question about &quot;Pointers to member functions&quot;. Pin
Bob Stanneveld22-Jul-05 1:57
Bob Stanneveld22-Jul-05 1:57 
GeneralRe: VC++2003: Question about &quot;Pointers to member functions&quot;. Pin
Maxwell Chen22-Jul-05 8:02
Maxwell Chen22-Jul-05 8:02 
GeneralRe: VC++2003: Question about &quot;Pointers to member functions&quot;. Pin
Maxwell Chen24-Jul-05 16:45
Maxwell Chen24-Jul-05 16:45 

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.