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

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

Posted by shzu2010508165 at 2011-02-10 14:25:05 on Problem 1656
In Reply To: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
在stastic后面加上 int 或者其他的试试




> #include<iostream>
> #include<string>
> using namespace std;
> 
> static int 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