Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 3
    wow - that's a lot of code for "get file name" from path... :) Commented Dec 15, 2011 at 13:15
  • 4
    @Nim My impression as well. In my own code, I use a one-liner: boost::filesystem::path( path ).filename(). Commented Dec 15, 2011 at 13:36
  • I have a CFileInfo class that has that code. I just dumped the code here because it is tested and I did not want to risk anything... You could just use about 5 lines of code from this example. Commented Dec 15, 2011 at 13:42