void changeOrder(ele *&stack1, elem *&stack2){ int r = 0; int elems = 0; int stack1Size = size(stack1) - 1; while(stack1Size != 0) { int r = pop(stack1); elems = stack1Size; while(elems-- > 0){ push(stack2, pop(stack1)); } push(stack1, r); while(stack2 != nullptr){ push(stack1, pop(stack2)); } stack1Size--; } }