youYou have to make sure you take care of file names with more then one dot. example: "c:\.directoryname\file.name.with.too.many.dots.ext"c:\.directoryname\file.name.with.too.many.dots.ext would not be handled correctly by strchrstrchr or find.find.
My favorite would be the boost filesystem libraryboost filesystem library that have an extension(path) function (library reference here)