最近做一個專案,里面需要在windows環境下,使用C++讀取出bz2壓縮中的bin二進制檔案,然后我看了bzip.org中的檔案,下載了一份庫,然后在VS2015中編譯出dll庫,并在一個試驗程式中使用,發現在bzRead中出現錯誤,代碼如下,請大牛指導一下,感激不盡!
const char*path = (filePath + fileName).c_str();
cout << filePath + fileName << endl;
FILE*fp = fopen(path,"rb+");
int a;
cout << fp << endl;
BZFILE*bzFp = BZ2_bzReadOpen(&a,fp,4,1,NULL, 0);
BZ2_bzread(bzFp, (char*)&m_RadarInfo, sizeof(tagWEATHERRADAR));
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/58084.html
