[ Web Proxy ]
URL:
Viewing: https://cs.cppreference.com/cpp/container/stack/pop [Back]  [Original]

pop cppreference.com
cppreference.com
Jmenn prostory
Varianty

pop

Z cppreference.com
<tbody> </tbody>
void pop();

Funkce pop() odebere jeden prvek z vrcholu zsobnku.

Pklad

stack<int> s;
for( int i = 0; i < 5; i++ )
{
   s.push(i);
}
while( !s.empty() )
{
   cout << s.top() << endl;
   s.pop();
}

Vstup:

5
4
3
2
1

Pbuzn tmata: push


Web Proxy Viewer  |  New URL  |  Original Page