谁能告诉我用vc++这MFC怎么编译(步骤)
class CRectangle{
public:
CRectangle();
virtual~CRectangle();
void imput();
double circum();
double area();
private:
double length;
double width;
};
CRectangle::CRectangle()
{
}
CRectangle::~CRectangle()
{
}
void CRectangle::imput()
{
CInputDlg Dlg;
if(IDOK==Dlg.DoModal())
{
length=Dlg.m_len;
width=Dlg.m_wid;
}
}
double CRectangle::circum()
{
return 2*(length+width);
}
double CRectangle:: area()
{
return length*width;
}
#include "stdafx.h"
void CTestView::OnMENURectangle()
{
//TODO:Add Onmmand handler code here
RedrawWindow();
CRectangle Rect;
Rect.imput();
CString Str;
CClientDC dc(this);
dc.SetTextColor(RGB(0,0,255));
Str.Format("长方形的周长为:%5.2f",Rect.circum());
dc.TextOut(100,60,Str);
Str.Format("长方形的面积为:%5.2f",Rect.area());
dc.TextOut(100,80,Str);
}
我要步骤,麻烦编译下,越详细越好,最好有图,呵呵