#include<iostream>
#include<math.h>
#include<stdlib.h>
using namespace std;
class ABC
{
private:
double i,j,p;
public:
ABC(double x,double y,double z):i(x),j(y),p(z){}
ABC() {}
double add()
{
return i+j+p;
}
double jian()
{
return i-j-p;
}
double cheng()
{
return i*j*p;
}
double div()
{
if(j==0) exit(0);
return i/j/p;
}
double yu()
{
if (j==0) exit(0);
return (int)i %(int)j%(int)p;
}
double chengf()
{
return (int)i^(int)j^(int)p;
}
double hunh()
{
return i+j*p;
}
};
void main()
{
int m,n,su=1,t;
char cp,temp;
cout<<"==========================欢迎使用简单计算器!========================"<<endl;
cout<<"==========================请选择你需要的服务!========================"<<endl;
cout<<("<9> <8> <7>")<<endl;
cout<<("<6> <5> <4>")<<endl;
cout<<("<3> <2> <1>")<<endl;
cout<<("<0>")<<endl;
cout<<("<+> <-> <*>")<<endl;
cout<<("</> <%> <^>")<<endl;
while (su){
cout<<"input the data:";
cin>>m>>cp>>n>>cp>>t;
ABC a(m,n,t);
switch(cp)
{
case '+':cout<<" "<<"="<<a.add(); break;
case '-':cout<<" "<<a.jian(); break;
case '*':cout<<" "<<a.cheng();break;
case '/':cout<<" "<<a.div(); break;
case '%':cout<<" "<<a.yu(); break;
case '^':cout<<" "<<a.chengf();break;
default:cout<<"有错误!";exit(0);
}
cout<<endl<<"还需要计算吗?(y or n)";
cin>>temp;
if(temp=='n')
{su=0;
cout<<"谢谢使用!"<<endl;}}
}
怎样实现源程序到带对话框exe文件的转换
我刚学vc,现在有一个简单计算器程序,哪位高手指点一下怎样实现此程序转换exe为文件(即所谓带对话框的"壳",带按扭的那种.)源程序如下: