problem with using poiters to pointers

ok so i have this piece of code.

else
{
char maxValue = -100;
char **newBoard;
for(std::list<GameTreeWithBoard>::iterator it=firstGameTree.gameTrees.begin();it!=firstGameTree.gameTrees.end();it++)
{
if(maxValue<(*it).value)
{
maxValue = (*it).value;
newBoard = (char**)(*it).nextMove;
}
}
for(char i=0;i<8;i++)
for(char j=0;j<8;j++)
board[i][j] = newBoard[i][j];
printArray();
firstGameTree.value = maxValue;
}

the line "board[i][j] = newBoard[i][j];" give me an error "access violation reading location. why does it do that?
(*it).nextMove is obviously not char**. Doing as if leads to this error. What is (*it).nextMove?



Please use code tags: [code]Your code[/code]
See: http://www.cplusplus.com/articles/z13hAqkS/
how did you get the code tags to not codify?
@Zephilinox
Something like this assuming the curly brackets as square brackets:
{co{b}{/b}de}{code}Your code{/code}{/code}
Topic archived. No new replies allowed.