|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
#include<iostream>
using namespace std;
class jc
{
public:
int putzt();
int putyxj();
int putdx();
};
int jc::putzt()
{
cout<<"1 就绪"<<' '<<"2 执行"<<' '<<"3 阻塞"<<endl;
int a;
cin>>a;
switch(a)
{
case 1:
cout<<"就绪"<<endl;
break;
case 2:
cout<<"执行"<<endl;
break;
case 3:
cout<<"阻塞"<<endl;
break;
}
return 0;
}
int jc::putyxj()
{
return 0;
}
int jc::putdx()
{
int x;
cout<<"输入文件的大小"<<endl;
cin>>x;
cout<<x<<"kb"<<endl;
return 0;
}
void main()
{
jc.putzt();
jc.putyxj();
jc.putdx();
} 为何老显示C:\Program Files\Microsoft Visual Studio\MyProjects\gy\rtg.cpp(43) : error C2143: syntax error : missing ';' before '.'
C:\Program Files\Microsoft Visual Studio\MyProjects\gy\rtg.cpp(43) : error C2143: syntax error : missing ';' before '.'
C:\Program Files\Microsoft Visual Studio\MyProjects\gy\rtg.cpp(44) : error C2143: syntax error : missing ';' before '.'
C:\Program Files\Microsoft Visual Studio\MyProjects\gy\rtg.cpp(44) : error C2143: syntax error : missing ';' before '.'
C:\Program Files\Microsoft Visual Studio\MyProjects\gy\rtg.cpp(45) : error C2143: syntax error : missing ';' before '.'
C:\Program Files\Microsoft Visual Studio\MyProjects\gy\rtg.cpp(45) : error C2143: syntax error : missing ';' before '.'
Error executing cl.exe.
gy.exe - 6 error(s), 0 warning(s)该怎么解决
|
|