I'm writing a simple sliding tiles (3x3) solver. It's not the best approach for sure i just generate all the possible configuration but I don't know why during the execution my pc freeze and I must manuallly restart. the's the main loop
while(!(tree->s==final))
{
//copy it in tree
expand_node(tree);
//check if in open then add if not
it++;
}
print_s(tree->s);
PS: I compiled everything with
g++ -Wall -Wextra -std=c++11 main.cpp