一个简单的c++程序--关注程序结构


源程序:

#include
using namespace std;

class Test
{
private:
int Width,Height;
public:

//以下是函数
void SetValue(int iWidth,int iHeight)
{
Width=iWidth;
Height=iHeight;
}

float GetValue(void)
{
return Width*Height;
}
};

int main()
{
Test T;
T.SetValue(10,20);
cout< return 1;
}

 运行结果:200

C++