I have tried to code the minimax algorithm for tic-tac-toe given in Russel Norvig\'s book on Artificial Intelligence. It had everything except that the way to return the bes
Your code finds the correct value but then overwrites it by passing the same reference down.
int curValue = min_move(state,bestMove);
should become
moveT nextMove; // No need to actually do anything with this value
int curValue = min_move(state,nextMove);
You also need to make the same kind of change in your min_move function.
NB: in min_move
your code calls max_move
with more arguments than you've defined for the function.