Get filename from path

I want to split a path into the filename and the directories.

I have tried to sscanf but i cant figure out how to set and forward slash as a white space

sscanf("%*s/%s.%s", path);
std::string::rfind() and std::string::substr().
thanks helios, i can now carry on with my projects thanks to you!
Topic archived. No new replies allowed.