struct Pile { int base[1024]; int *prochain; }; typedef struct Pile Pile ; main() { Pile pile; struct { int base[5]; int *prochain; } ptmp ; int i = 1; (pile).prochain = ((pile).base); (ptmp).prochain = ((ptmp).base); while (!((ptmp).prochain >= ((ptmp).base + (sizeof((ptmp)).base /sizeof((ptmp)).base[0])))) { (*(ptmp).prochain++ = (i)); i++; } printf("- Pile ptmp pleine:\n"); printf(" sommet de ptmp = %d\n", (*((ptmp).prochain-1))); if (! ((pile).prochain >= ((pile).base + (sizeof((pile)).base /sizeof((pile)).base[0]))) && ! ((ptmp).prochain == (ptmp).base)) { (*(pile).prochain++ = ((*--(ptmp).prochain))); printf("- EMPILER(pile, DEPILER(ptmp)):\n"); printf(" sommet de ptmp = %d\n", (*((ptmp).prochain-1))); printf(" sommet de pile = %d\n", (*((pile).prochain-1))); } }