Original Post
ok, the following code will take variable filename, and get all text from it, except for the last 4 characters (ie: ".ext")
(name is already defined as "unsigned char *name;")
char *capfilename; int nlen=(int)strlen(filename); capfilename=new char[(nlen)+1]; for(int i=0;i<=nlen;i++) capfilename[ i ]=tolower(filename[ i ]); name = new char[(nlen-4)+1]; for(int i=0;i(yes im being very careful about my data, even deleting the strings, lol) anyways, if you pass, lets say "C:/windows/something.bmp", the name is set to "C:/windows/something" i need to know how to get rid of everything that comes before the last "/" without using strtok() i have a feeling its going to involve using one of the "find last occurence of character in a string" functions could anyone help me out?