Well done! I need to do this part of the code in C ++ comparing if the elements of Stack 1 are the same as Stack 2 and if the number of elements are exactly the same. I do not know how to implement this part of the code. I created the variable int i to scroll through the list. #MeAjudem
int compara_pilha1_com_pilha2 (Pilha* pi1, Pilha* pi2)
{
int i;
if(pi1 == NULL || pi1->qtd == 0 || pi2 == NULL || pi2->qtd == 0)
{
return 0;
}
for(i = 0; i<pi1->qtd; i++)
{
}