stack: Exemple d’ajout et de suppression

Author:


Download


#include 
#include 
using namespace std;

int main()
{

   stack< int > intStack;

   //Ajouter des élément à la tête de 'stack'
   for ( int i = 0; i <= 9; i++ )
   {
      intStack.push( i );
      cout << "Val: "<< intStack.top() << "n";
   }

  cout<<"Affichage LIFOn";
   while ( !intStack.empty() )
   {
      cout << "Val: "<
    

Leave a Reply

Your email address will not be published. Required fields are marked *