c++ - How do I use QuaZip to extract multiple files? -


i have below code move through list of folders , files in zip archive creating them goes (also creating paths files if not created yet).

the application crashes when use readdata(char*, qint64) extract internal files data stream qfile. don't think right thing use it's i've seen (in loose example on site) , had change quazipfile.h make function public can use (also hinting shouldn't using it).

it doesn't crash on first file has no contents after that. here necessary code (ask if need see more):

qfile newfile(fnames); newfile.open(qiodevice::writeonly); qtextstream outtofile(&newfile); char * data; int len = file.readdata(data, 100000000); if(len > 0) {     outtofile << data; } newfile.close(); 

it doesn't pass int len line. should using here? note variable file defined earlier pretty puch this:

quazip zip("zip.zip"); quazipfile file(&zip); ... zip.gotofirstfile(); ... zip.gotonextfile(); 

and int passed readdata random number max data size.

the reason crash have not allocated memory buffer, named data.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -