다음을 통해 공유


queue::value_type

A type that represents the type of object stored as an element in a queue.

typedef typename Container::value_type value_type;

Remarks

The type is a synonym for the value_type of the base container adapted by the queue.

Example

// queue_value_type.cpp
// compile with: /EHsc
#include <queue>
#include <iostream>

int main( )
{
using namespace std;

   // Declares queues with default deque base container
   queue<int>::value_type AnInt;
   
   AnInt = 69;
   cout << "The value_type is AnInt = " << AnInt << endl;

   queue<int> q1;
   q1.push(AnInt);
   cout << "The element at the front of the queue is "
        << q1.front( ) << "." << endl;
}

The value_type is AnInt = 69
The element at the front of the queue is 69.

Requirements

Header: <queue>

Namespace: std

See Also

Concepts

queue Class

queue Members

Standard Template Library