-1
You guys, good night! I need to do this part of the code in C++ comparing whether the elements on Stack 1 are the same as on Stack 2 and whether the amount of elements are exactly the same. I don’t know how to implement that part of the code. I created the int i variable to go 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++)
{
}
How the structure is defined
Pilha
? How the elements were inserted ?– Isac