blob: f1f8e6a0fda7a89848894fd2dc61258830b54bcd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QtGui>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
//! [0]
QStack<int> stack;
stack.push(1);
stack.push(2);
stack.push(3);
while (!stack.isEmpty())
cout << stack.pop() << Qt::endl;
//! [0]
}
|