and let compress these files to zip at desktop: myzip.zip
How should I use your code?
struct zip_t* zip = zip_open(output, ZIP_DEFAULT_COMPRESSION_LEVEL, 'w');
{
for (const auto& item : vec) {
zip_entry_open(zip, item.c_str()); //<-add item to zip file
zip_entry_close(zip) ;
}
zip_close(zip);
}
but when opening the zip, it's all empty.
How I can fix this?
Thank you.
Hi, I have a list of files in vector
C:\Users\admin\Downloads\1.doc C:\Users\admin\Downloads\2.txt C:\Users\admin\Downloads\3.txt
and let compress these files to zip at desktop: myzip.zip How should I use your code? struct zip_t* zip = zip_open(output, ZIP_DEFAULT_COMPRESSION_LEVEL, 'w'); { for (const auto& item : vec) { zip_entry_open(zip, item.c_str()); //<-add item to zip file zip_entry_close(zip) ; } zip_close(zip); } but when opening the zip, it's all empty. How I can fix this? Thank you.