view Paper/src/ex_stack.cbc @ 0:a5facba1adbc

first
author ryokka
date Fri, 13 Apr 2018 18:07:04 +0900
parents
children
line wrap: on
line source

__code clearSingleLinkedStack(struct SingleLinkedStack* stack,__code next(...)) {
    stack->top = NULL;
    goto next(...);
}

__code pushSingleLinkedStack(struct SingleLinkedStack* stack,union Data* data, __code next(...)) {
    Element* element = new Element();
    element->next = stack->top;
    element->data = data;
    stack->top = element;
    goto next(...);
}