This error appears sometimes only when I call a recursive function of which one of the parameters is a number: rand()%10. Just like in the code down below:
private: System::Void AIrandomMove(int randomMove,String ^s)
{
/* Implementation */
AIrandomMove(rand()%10,s); // here it appears the System.StackOverflowException
}
How can I handle this?
Aucun commentaire:
Enregistrer un commentaire