Click here to Skip to main content
15,903,175 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: VT_DISPATCH variant Pin
Stephen Hewitt2-Apr-07 14:05
Stephen Hewitt2-Apr-07 14:05 
QuestionImporting MakeFiles Pin
shiraztk1-Apr-07 23:31
shiraztk1-Apr-07 23:31 
QuestionRegarding Read/Write Floppy Drive [modified] Pin
VC_RYK1-Apr-07 23:28
VC_RYK1-Apr-07 23:28 
AnswerRe: Regarding Read/Write Floppy Drive Pin
toxcct1-Apr-07 23:29
toxcct1-Apr-07 23:29 
QuestionExcel in MFC Doc View Application Pin
Vikrant for VC++1-Apr-07 23:24
Vikrant for VC++1-Apr-07 23:24 
AnswerRe: Excel in MFC Doc View Application Pin
Rajesh R Subramanian1-Apr-07 23:35
professionalRajesh R Subramanian1-Apr-07 23:35 
AnswerRe: Excel in MFC Doc View Application Pin
#realJSOP2-Apr-07 9:59
professional#realJSOP2-Apr-07 9:59 
QuestionRemove Backslashes Pin
Programm3r1-Apr-07 23:24
Programm3r1-Apr-07 23:24 
Hi all,

How can one remove the backslashes froma string(path) to get the filename.
For example you have a path: C:\<dir>\testfile.txt
Now I want to get only the testfile.txt part.

I wrote a function, but it doesn't do exactly what I want, can anyone help.
static char *FindLastSlash(char *Ptr)
{
	char c;
	char *LastPtr = NULL;
	while(1)
    {
		c = *Ptr;
		if(c=='\\') LastPtr = Ptr;
		if(c=='\0') break;
		Ptr++;
	}
	return LastPtr;
}


Mant thanx,
Regards,


The only programmers that are better than C programmers are those who code in 1's and 0's..... Smile | :)

Smile | :) Programm3r

My Blog: ^_^

AnswerRe: Remove Backslashes Pin
toxcct1-Apr-07 23:27
toxcct1-Apr-07 23:27 
AnswerRe: Remove Backslashes Pin
_AnsHUMAN_ 1-Apr-07 23:35
_AnsHUMAN_ 1-Apr-07 23:35 
GeneralRe: Remove Backslashes Pin
Programm3r1-Apr-07 23:58
Programm3r1-Apr-07 23:58 
AnswerRe: Remove Backslashes Pin
Parthi_Appu1-Apr-07 23:36
Parthi_Appu1-Apr-07 23:36 
GeneralRe: Remove Backslashes Pin
Programm3r1-Apr-07 23:57
Programm3r1-Apr-07 23:57 
GeneralRe: Remove Backslashes Pin
Michael Dunn2-Apr-07 15:49
sitebuilderMichael Dunn2-Apr-07 15:49 
GeneralRe: Remove Backslashes Pin
Parthi_Appu2-Apr-07 16:34
Parthi_Appu2-Apr-07 16:34 
GeneralRe: Remove Backslashes Pin
Michael Dunn2-Apr-07 20:11
sitebuilderMichael Dunn2-Apr-07 20:11 
GeneralRe: Remove Backslashes Pin
Parthi_Appu2-Apr-07 21:14
Parthi_Appu2-Apr-07 21:14 
AnswerRe: Remove Backslashes Pin
prasad_som1-Apr-07 23:38
prasad_som1-Apr-07 23:38 
GeneralRe: Remove Backslashes Pin
Eytukan1-Apr-07 23:40
Eytukan1-Apr-07 23:40 
GeneralRe: Remove Backslashes Pin
prasad_som1-Apr-07 23:49
prasad_som1-Apr-07 23:49 
GeneralRe: Remove Backslashes Pin
Programm3r1-Apr-07 23:55
Programm3r1-Apr-07 23:55 
GeneralRe: Remove Backslashes Pin
Naveen2-Apr-07 1:08
Naveen2-Apr-07 1:08 
AnswerRe: Remove Backslashes Pin
prasad_som2-Apr-07 1:48
prasad_som2-Apr-07 1:48 
GeneralRe: Remove Backslashes Pin
Naveen2-Apr-07 1:55
Naveen2-Apr-07 1:55 
AnswerRe: Remove Backslashes Pin
prasad_som2-Apr-07 2:01
prasad_som2-Apr-07 2:01 

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.