Global Variable doesnt work?
Dec 24, 2011 at 5:24pm
Here is a simple version of the problem..(handwritten so there might be errors..)
1 2 3 4 5 6 7 8 9
|
//global vars/////
char player = 'P';
//main func////
int main()
{
gameBoard[playerX][playerY] = player;
displayerboard();
}
|
When i try doing it like that, where player should be is just a dot from when i filled the gameboard with dots.
BUT, if i do..
gameBoard[playerX][playerY] = 'P';
if works fine.
Why is this?
Dec 24, 2011 at 5:50pm
NVM i got it..
Topic archived. No new replies allowed.