首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

zip压缩有关问题

2012-04-18 
zip压缩问题我建立一个控制台的应用程序,然后在工程中加入unzip.cpp和unzip.h两个文件代码如下:C/C++ code

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>

[解决办法]
引用楼主 fanlehai 的帖子:
我建立一个控制台的应用程序,然后在工程中加入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: 'H…

热点排行