ciao!

ieri ho testato questo codice per listare file in maniera ricorsiva:
codice:
#include 
#include 

using namespace std;

int callback(const char *path, const struct stat *st, int flags) {
    cout << st->st_uid << "  " << st->st_gid << "  " << path << "n";
    return 0;
}

int main(int argc, const char *argv[]) {
    return ftw("/etc", callback, 1);
}
funziona, però in verità a me servirebbe altro.
nel senso che questo codice mi mostra a video tutti i files.
io invece vorrei aggiungerli ad un vector, per poi riusarlo.
un suggerimento su come fare (anche non usando ftw ovviamente)?