Getting specfic files in C++ code form *nix system

I want to get all the files of type A*.txt present in current directory via C++ code. My OS is *Nix system. Also, I want to get the names of such files.

Please suggest how can this be done.

I tried using system command but system doesn’t return anything apart a integer which says if command was executed properly or not?


Source: unix

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.