Q:

Zipios error on Mac 10.9 using Qt 5.4 and Clang(64 bit)

I am trying to use Zipios++(v2.1.0) C++ library for zipping files on Mac 10.9.  Below is my code to zip a collection of files into an archive.  
zipios::ZipFile zf;
zipios::DirectoryCollection dirCollection(<folder with all files>);
zipios::DirectoryCollection finalCollection;

zipios::FileEntry::vector_t files = dirCollection.entries();

// selecting only the necessary files
for(auto it = files.begin(); it ! = files.end(); ++it)
{
    // THIS IS WHERE I GET AN ERROR
    zipios::DirectoryEntry dirEntry = dynamic_cast<zipios::DirectoryEntry>(**it);
    if(arrFiles.contains(QString::fromStdString(dirEntry.getFileName())))
        finalCollection.addEntry(*(*it));
}

std::filebuf fb;
fb.open (strFileName.toStdString(), std::ios::out);
std::ostream os(&fb);
zf.saveCollectionToArchive(os, finalCollection);
fb.close();
zf.close();

I need to iterate the files inside the folder and if they match my list of files to be included I add them to finalCollection for archiving.  But I am not able to cast it properly.  Does anyone have any sample code for zipping multiple files to one file using Zipios?  Any advice on the below code will be helpful.  Thanks. 
UPDATE:
I was able to fix the error.  Below code changes worked for me-
for(auto entry(files.begin()); entry ! = files.end(); ++entry)
{
    if(!(*entry)->isDirectory())
    {
      if(arrFiles.contains(QString::fromStdString((*entry)->getFileName())))
        finalCollection.addEntry(*(*entry));
    }
}

A:

I was able to fix the error.  Below code changes worked for me-
for(auto entry(files.begin()); entry ! = files.end(); ++entry)
{
    if(!(*entry)->isDirectory())
    {
      if(arrFiles.contains(QString::fromStdString((*entry)->getFileName())))
        finalCollection.addEntry(*(*entry));
    }
}

The issue was I was not dereferencing the pointers properly, a good look at the zipios code gave some ideas and this is what worked!