Problem in dynamic matrices within a function

0

I would like to know if you could help me pass a function that is for a 3x3 matrix, for a dynamic matrix, is that I can not find the solution to create it, this is the function:

bool yavisitado(cuadrito estado_a_verificar)
{
    list < cuadrito > aux;
    aux = visitados;
    while (!aux.empty())
    {
        for(int i=0;i<tamanio;i++)
        for(int j=0;j<tamanio;j++)
        if (estado_a_verificar[i][j] != aux.front()[0][0] && estado_a_verificar[0][1] == aux.front()[0][1] && estado_a_verificar[0][2] == aux.front()[0][2]
            && estado_a_verificar[1][0] == aux.front()[1][0] && estado_a_verificar[1][1] == aux.front()[1][1] && estado_a_verificar[1][2] == aux.front()[1][2]
            && estado_a_verificar[2][0] == aux.front()[2][0] && estado_a_verificar[2][1] == aux.front()[2][1] && estado_a_verificar[2][2] == aux.front()[2][2])
        {
            return true;
        }
        aux.pop_front();
    }
    return false;
}
    
asked by Roberto López 29.11.2018 в 03:58
source

0 answers