當前位置:編程學習大全網 - 網站源碼 - C++怎麽實現解壓RAR或者ZIP文件

C++怎麽實現解壓RAR或者ZIP文件

可以用system 去調用批處理的

#include<stdio.h>

#include<windows.h>

#include<tchar.h>

int main()

{

char rarPath[256];

puts(_T("填入妳系統的WINRAR.exe所在目錄:"));

gets(rarPath);

SetCurrentDirectory(rarPath);

//解壓c:\1.rar到Myjpg目錄裏

char* lcm="rar x \"c:\\1.rar\" \"c:\\Myjpg\\\"";

printf("shell command line :%s\n",lcm);

system(lcm);

puts(_T("解壓完畢."));

return 0;

}

  • 上一篇:js如何實現模糊查詢及帶下拉菜單?
  • 下一篇:海康威視門禁設備如何批量刪除權限
  • copyright 2024編程學習大全網