a code to filter full path
Code:
char *path_filter(char *path_exe)
{
// char path_buffer[MAX_PATH];
char drive[_MAX_DRIVE];
char dir[_MAX_DIR];
char fname[_MAX_FNAME];
char ext[_MAX_EXT];
_splitpath(path_exe ,drive, dir , fname , ext );
return drive dir fname;
}
i am trying to write a code to filter a full path to a exe file
for example,
"C:\\Program Files\\Webzen\\mu\\mu.exe"
after filtering by function returns
"C:\\Program Files\\Webzen\\mu"
the above is what i have tried to write but doesnt work
anything wrong?
how should i return the function?
return drive dir fname definately doesnt work
returning different char types
Code:
char drive[_MAX_DRIVE];
char dir[_MAX_DIR];
char fname[_MAX_FNAME];
char ext[_MAX_EXT];
char *fx()
{
.........
return drive, dir,fname;
}
let's say
drive = c:\
dir = a_dir\
fname = abc.exe
how do i make it return "c:\a_dir\abc.exe"???
the above code doesnt cut it