hi
just wondering about this i'm using dev-c++ 4.9.9.2
i get the error:Code:/* Simple tictactoe program Human vs Human */ using namespace std; #include<iostream> #include<string> namespace board { char board[3][3]; // contains the board array int i=0; // I put this here because it was getting resest to 0 after cin } /* Draw tic tac toe board */ void board_draw() { using namespace board; cout << "\n"; cout << " A B C \n\n"; for (int x=0;x<3;x++) { cout << x << " "; for (int y=0;y<3;y++) { cout << board[x][y];
D:\Dev-Cpp\source\TicTacToe\main.cpp In function `void board_draw()':
25 D:\Dev-Cpp\source\TicTacToe\main.cpp `board' undeclared (first use this function)
if i use
it compiles okCode:board::board[x][y]