boost c++ ,list dir non recursive with filter by extension
path current_dir("."); //
std::string name , extension;
for (directory_iterator iter(current_dir), end; iter != end; ++iter)
{
name = boost::filesystem::basename(iter->path().filename());
extension = boost::filesystem::extension(iter->path().filename());
name+=extension;
if (name==".txt" || name==".TXT")
std::cout << name << "\n";
}