Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
error C4430: 求救:missing type specifier - int assumed. Note: C++ does not support default-interror C4430: missing type specifier - int assumed. Note: C++ does not support default-int 编译错误,在vc6里面通过,但oj里面就提示上面的错误。各位大侠指点一下~ 代码如下: #include<iostream> #include<string> using namespace std; static matrix[101][101]; int main(void) { //char s[10]; string s; int num; int x,y,l; int count=0; int m,n; cin>>num; while(num--) { cin>>s; cin>>x>>y>>l; if(s=="WHITE") { for(m=x;m<x+l;m++) for(n=y;n<y+l;n++) matrix[m][n]=0; } if(s=="BLACK") { for(m=x;m<x+l;m++) for(n=y;n<y+l;n++) matrix[m][n]=1; } if(s=="TEST") { count=0; for(m=x;m<x+l;m++) for(n=y;n<y+l;n++) { if(matrix[m][n]==1) count++; } cout<<count<<endl; } } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator