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

Hey all,

This is the header checker.h

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include "player.h"


#ifndef CHECKER_H
#define CHECKER_H


class checker
{
public:
	checker();
	~checker();
	board_type board[8][8];
	player black;
	player white;
	static int player_turn;
	bool check_to_eat(board_type a[8][8],int player_t);
	
private:
	
	int static const black_count=12;
	int static const white_count=12;


};
#endif 


And this is just the constructor for checker :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
checker::checker()
{
	int bcount=black_count;
	int wcount=white_count;
	
	black.pcolor=BLACK;
	white.pcolor=WHITE;

	player_turn=WHITE;

	int i,j,k;

	for(i=0;i<8;i++)
		for(j=0;j<8;j++)
			board[i][j]=NON;

	for(i=0;i<3;i++)
		for(j=0;j<4;j++)
		{
			if(j%2==0)
			{
				k=2*j+1;
				board[i][2*j]=BLACK;

			//	black.update_stone(i, k,bcount,BLACK);
			
			}
			if(j%2!=0)
			{
				k=2*j+1;
				board[i][2*j+1]=BLACK;
		//		black.update_stone(i, k,bcount,BLACK);
			}
		}

	for(i=4;i<8;i++)
		for(j=0;j<4;j++)
		{
			if(j%2==0)
			{
				k=2*j;
				board[i][k]=WHITE;
		//		white.update_stone(i,k,wcount,WHITE);
			}

			if(j%2!=0)
			{
				k=2*j+1;
				board[i][2*j+1]=WHITE;
			//	white.update_stone(i,k,wcount,WHITE);
			}
		}

		for(i=0;i<8;i++)
			if(i%2!=0)
			board[3][i]=EMP;
		
		for(i=0;i<8;i++)
			if(i%2==0)
			board[4][i]=EMP;


};


I included player.h in checker.h.
I have errors that say : "error C4430: missing type specifier - int assumed. Note: C++ does not support default-int" ,"error C2146: syntax error : missing ';' before identifier 'black'".

maybe player.h will help :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef PLAYER_H
#define PLAYER_H

//#include "move.h"
#include "stone.h"


class player
{
public:
	player():pcolor(NON){};
	~player();

	board_type pcolor;		// player's color
	stone blacks[12];
	stone whites[12];
	stone eat_move_b[12];
	stone eat_move_w[12];

	void update_stone(int &i, int &j,int &count, board_type a);		//updates stone

	void update_pos(int &_i,int & _j ,player a,int &count);		// updates stone's pos
	
private:
	
	//move pmove;


};
#endif 


Please help !!
Thanks in advance :)

At what line do you get the error?
14 , 15 at checker.h
6,7 at checker::checker()
Topic archived. No new replies allowed.