Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

error C4430: 求救:missing type specifier - int assumed. Note: C++ does not support default-int

Posted by gzhu_yewenhua at 2009-08-18 11:28:54 on Problem 1656
error 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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator