Created
November 29, 2011 16:49
-
-
Save MiLk/1405487 to your computer and use it in GitHub Desktop.
NF16-TP05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void empiler(Pile* pile, NodePtr noeud) | |
| { | |
| Element* element; | |
| element->noeud = noeud; | |
| element->succ = (*pile); | |
| pile = &element; // L'adresse de la pile vaut l'adresse de l'élément | |
| } | |
| NodePtr depiler(Pile* pile) | |
| { | |
| Element* element = (*pile); | |
| pile = &(element->succ); | |
| return element; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| typedef struct Element { | |
| NodePtr noeud; | |
| struct Element* succ; | |
| } Element ; | |
| typedef *Element Pile; // Pile est un pointeur sur le dernier Element de la pile | |
| void empiler(Pile* pile, NodePtr noeud); | |
| NodePtr depiler(Pile* pile); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment