Apr 2, 2012 at 4:54am UTC
I am trying to use certain variables accross multiple functions so I have used pointers and it works accross the majority of my code but when I get to the function that calls all the other functions and acctually runs the program it tells me that the identifyers are undefined
Apr 2, 2012 at 5:12am UTC
maybe if you could elaborate or post some code, it will be easier for people to help
Apr 2, 2012 at 5:24am UTC
how are your function declarations set up?
Apr 2, 2012 at 5:26am UTC
like this
bool verifyMakeMove(char gameBoard[],int BOARD_SIZE, int & mref, int & pref);
Apr 2, 2012 at 5:29am UTC
is that the function code for the code above?
Apr 2, 2012 at 5:34am UTC
no the above code is part of
int playGame();
but playGame's main purpose is simply calling the other functions in a specific order
Apr 2, 2012 at 5:41am UTC
since arrays are pointers, you could simply pass gameBoard as a pointer and take the address of that..? i dunno it looks fine to me
Apr 2, 2012 at 8:00am UTC
could it be something to do with the order in which the functions are called and when the pointers are declared
Apr 2, 2012 at 10:24am UTC
I am really hoping that its a simple mistake causeing this something that dosent require me to go back and completely re-code the program