Click here to Skip to main content
16,016,744 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Compiler fun Pin
Jose Lamas Rios12-Aug-05 5:36
Jose Lamas Rios12-Aug-05 5:36 
GeneralRe: Compiler fun Pin
Chris Losinger12-Aug-05 4:08
professionalChris Losinger12-Aug-05 4:08 
Questionhow to insert a back slash \ in a string Pin
caykahve11-Aug-05 21:50
caykahve11-Aug-05 21:50 
AnswerRe: how to insert a back slash \ in a string Pin
Cedric Moonen11-Aug-05 21:53
Cedric Moonen11-Aug-05 21:53 
GeneralRe: how to insert a back slash \ in a string Pin
caykahve11-Aug-05 22:11
caykahve11-Aug-05 22:11 
GeneralRe: how to insert a back slash \ in a string Pin
Cedric Moonen11-Aug-05 22:16
Cedric Moonen11-Aug-05 22:16 
GeneralRe: how to insert a back slash \ in a string Pin
caykahve11-Aug-05 22:43
caykahve11-Aug-05 22:43 
GeneralRe: how to insert a back slash \ in a string Pin
Cedric Moonen11-Aug-05 22:52
Cedric Moonen11-Aug-05 22:52 
caykahve wrote:
// Here I have PFPath as "C:\folder1\folder2"
int i=0;
while( PFPath.Find("\",i)!=-1 )
{
PFPath.Insert(i,(CString)".\");
i+=2;
}
// Here I want to have PFPath as "C:\\folder1\\folder2"


Ok, another problem is here: the find function returns the starting position of the substring found in the string. So, when you insert the new character, it will insert it at the position 'i' that is left the same (so 0 in the first case). You must take the value returned by Find() and insert the new char there.
GeneralRe: how to insert a back slash \ in a string Pin
caykahve11-Aug-05 23:24
caykahve11-Aug-05 23:24 
AnswerRe: how to insert a back slash \ in a string Pin
David Crow12-Aug-05 3:22
David Crow12-Aug-05 3:22 
GeneralRe: how to insert a back slash \ in a string Pin
caykahve12-Aug-05 5:47
caykahve12-Aug-05 5:47 
GeneralRe: how to insert a back slash \ in a string Pin
David Crow12-Aug-05 6:06
David Crow12-Aug-05 6:06 
Generalsocket communication with video Pin
Nishad S11-Aug-05 21:41
Nishad S11-Aug-05 21:41 
GeneralRe: socket communication with video Pin
ThatsAlok11-Aug-05 22:24
ThatsAlok11-Aug-05 22:24 
GeneralSorting List View Pin
BicycleTheif11-Aug-05 20:45
BicycleTheif11-Aug-05 20:45 
GeneralRe: Sorting List View Pin
Jose Lamas Rios11-Aug-05 20:50
Jose Lamas Rios11-Aug-05 20:50 
GeneralRe: Sorting List View Pin
SVPG12-Aug-05 0:55
SVPG12-Aug-05 0:55 
GeneralRe: Sorting List View Pin
David Crow12-Aug-05 3:27
David Crow12-Aug-05 3:27 
GeneralMS Word automation Pin
Imtiaz Murtaza11-Aug-05 18:05
Imtiaz Murtaza11-Aug-05 18:05 
GeneralRe: MS Word automation Pin
Jose Lamas Rios11-Aug-05 18:35
Jose Lamas Rios11-Aug-05 18:35 
Generalhelp needed VC++ with MS Word Pin
Barm11-Aug-05 15:48
Barm11-Aug-05 15:48 
GeneralRe: help needed VC++ with MS Word Pin
Jose Lamas Rios11-Aug-05 16:21
Jose Lamas Rios11-Aug-05 16:21 
GeneralRe: help needed VC++ with MS Word Pin
Barm11-Aug-05 16:38
Barm11-Aug-05 16:38 
GeneralMore help needed VC++ with MS Word Pin
Barm11-Aug-05 17:41
Barm11-Aug-05 17:41 
GeneralExit codes Pin
#realJSOP11-Aug-05 15:45
professional#realJSOP11-Aug-05 15: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.