1.求vc写的源码直接从一个网站上exe程序得源代码!
2.急求VC源代码
求vc写的直接从一个网站上exe程序得源代码!
首先引入头文件#include"afxinet.h"。使用函数BOOL GetFromWeb(LPSTR pURL,源码LPSTR SaveAsFilePath)进行操作。
其中,源码晴天导航源码参数pURL为URL路径,源码SaveAsFilePath为保存路径。源码c语言system源码初始化CInternetSession session;作为会话期对象,源码qt quick实例源码CHttpConnection *pServer=NULL;指向服务器地址(URL),源码CHttpFile *pHttpFile=NULL;为HTTP文件指针。源码
定义CString strServerName;为服务器名,源码CString strObject;为查询对象名(会话。源码if(pHttpFile!=NULL) delete pHttpFile; if(pServer!=NULL) delete pServer; session.Close(); return TRUE;
至此,源码从指定网站下载exe程序的源码源代码的过程完成。通过调用该函数并传入URL和保存路径即可实现。源码赏赚帮源码
急求VC源代码
(1)
#include<iostream>
using namespace std;
int main()
{
float num1,源码num2;
char ch;
begin:
cout<<"请输入第1个数:\n";
cin>>num1;
cout<<"请输入运算符:\n";
cin>>ch;
cout<<"请输入第2个数:\n";
cin>>num2;
switch(ch)
{
case '+':
cout<<"结果:"<<num1+num2<<endl;
break;
case '-':
cout<<"结果:"<<num1-num2<<endl;
break;
case '*':
cout<<"结果:"<<num1*num2<<endl;
break;
case '/':
if(int(num2)!=0)
{
cout<<"结果:"<<num1/num2<<endl;
}
else
{
cout<<"除数不能为0,请重新输入.\n";
goto begin;
}
break;
default:
cout<<"你输入的运算符错误,请重新输入.\n";
goto begin;
}
getchar();
return 0;
}
(2)
#include <iostream>
#include<string>
using namespace std;
int main()
{
char num1[];
char num2[];
char ch;
int n=0;
int i=0;
float count=0;
string inStr;
begin:
cout<<"请输入:";
cin>>inStr;
memset(num1,0,);
memset(num2,0,);
for(i=0; inStr[i]!='\0'; i++)
{
if(inStr[i]=='+' ||inStr[i]=='-' ||inStr[i]=='*' ||inStr[i]=='/' )
{
break;
}
else
{
num1[i]=inStr[i];
}
}
ch=inStr[i];
i++;
for(; inStr[i]!='\0'; i++)
{
if(inStr[i]=='+' ||inStr[i]=='-' ||inStr[i]=='*' ||inStr[i]=='/' )
{
break;
}
else
{
num2[n]=inStr[i];
n++;
}
}
switch(ch)
{
case '+':
count=float(atoi(num1))+float(atoi(num2));
break;
case '-':
count=float(atoi(num1))-float(atoi(num2));
break;
case '*':
count=float(atoi(num1))*float(atoi(num2));
break;
case '/':
if(atoi(num2)!=0)
{
count=float(atoi(num1))/float(atoi(num2));
}
else
{
cout<<"除数不能为0"<<endl;
goto begin;
}
break;
}
cout<<"结果是:"<<count<<endl;
}
祝你好运了!!!!!!!!!!!!!
2024-12-27 01:06
2024-12-27 00:56
2024-12-27 00:26
2024-12-26 23:59
2024-12-26 23:54
2024-12-26 23:23
2024-12-26 23:03
2024-12-26 22:48