zip压缩问题
我建立一个控制台的应用程序,然后在工程中加入unzip.cpp和unzip.h两个文件
代码如下:
- C/C++ code
#include "stdafx.h"#include "zip.h"int main(int argc, char* argv[]){ HZIP hz = CreateZip("c:\\simple1.zip",0); ZipAdd(hz,"znsimple.bmp", "c:\\simple.bmp"); ZipAdd(hz,"znsimple.txt", "c:\\simple.txt"); CloseZip(hz); return 0;}可是运行会出现
error C2065: 'HZIP' : undeclared identifier
error C2501: 'DECLARE_HANDLE' : missing storage-class or type specifiers
error C2146: syntax error : missing ';' before identifier 'ZRESULT'
fatal error C1004: unexpected end of file found
这几处错误,能否帮我解决啊?
如果不明白,代码在附件中!帮忙下载下看看。谢谢
我是按下面这个网址的说法做的
http://www.80dnst.com/read.php?tid=60
[解决办法]
在zip.h中加上传说中的头文件
#include <windows.h>
[解决办法]