请问我哪里错了
#include <iostream>using namespace std;
enum Computer_Op {dos,windows,xp,win7,vista,win8,win10};
class Computer
{
private:
Computer_Op op;
int mem;
int hard;
public:
Computer_Op GetOp()
{
return op;
}
int Mem()
{
return mem;
}
int Hard()
{
return hard;
}
void SetOp(Computer_Op o)
{
op= o;
}
void SetMem(int m)
{
mem = m;
}
void SetHard(int h)
{
hard= h;
}
void Run()
{
cout << "系统属性值!" << endl;
}
void Stop()
{
cout << "结束!" << endl;
}
};
void main()
{
Computer a;
a.SetMem(100);
a.SetOp(dos);
a.SetHard(5.0);
a.Run();
cout << a.GetMem() <<endl;
cout << a.GetOp() <<endl;
cout << a.GetHard() <<endl;
a.Stop();
}