Advertisement
Guest User

Untitled

a guest
Sep 26th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. if (racine==NULL){
  2.     racine = ptr_c;
  3.     ptr_p = ptr_c;
  4. }
  5. else {
  6.     switch (emplacement){
  7.     case 'g':
  8.         pile.push(ptr_p);
  9.         ptr_p->ptrGauche = ptr_c;
  10.         ptr_p = ptr_c;
  11.         break;
  12.     case 'd':
  13.         if (sizeof(pile) != 0) {
  14.             ptr_p = pile.top();
  15.             pile.pop();
  16.         }
  17.         ptr_p->ptrDroit = ptr_c;
  18.         ptr_p = ptr_c;
  19.         break;
  20.     }
  21.  
  22.     if (ptr_c->sorte == 'O') {
  23.         emplacement = 'g';
  24.         }
  25.     else emplacement = 'd';
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement