下载者
作者:互联网
#include "stdafx.h"
#include<iostream>
using namespace std;
#include <Windows.h>
#include<urlmon.h>
#pragma comment (lib,"urlmon.lib")
int _tmain(int argc, _TCHAR* argv[])
{
char zsSortName[MAXBYTE]={0};
char zsSortFilePath[MAXBYTE]={0};
cout<<"输入下载软件的网上地址链接:";
cin>>zsSortName;
cout<<endl;
cout<<"输入下载软件的文件保存的具体路径及名称:";
cin>>zsSortFilePath;
if(S_OK==URLDownloadToFile (nullptr,zsSortName,zsSortFilePath,0,nullptr))
{
cout<<"下载成功"<<endl;
}
else
{
cout<<"下载失败"<<endl;
}
return 0;
}
标签:zsSortFilePath,cout,int,zsSortName,char,下载者,include 来源: https://www.cnblogs.com/gd-luojialin/p/10963177.html