is QStack empty : QStack « Qt « C++






is QStack empty

  

#include <QtGui>
#include <iostream>
using namespace std;

int main(int argc, char *argv[])
{
    QStack<int> stack;
    stack.push(1);
    stack.push(2);
    stack.push(3);
    while (!stack.isEmpty())
        cout << stack.pop() << endl;

}

   
    
  








Related examples in the same category

1.Create int QStack
2.Push to QStack
3.Push value to QStack, and pop out
4.QStack of QString