queue with doubles
#include <iostream> using std::cout; using std::endl; #include <queue> int main() { std::queue< double > values; values.push( 3.2 ); values.push( 9.8 ); values.push( 5.4 ); cout << "Popping from values: "; while ( !values.empty() ) { cout << values.front() << ' '; values.pop(); } cout << endl; return 0; } /* Popping from values: 3.2 9.8 5.4 */
1. | queue: push, pop, front and size | ||
2. | queue.front() | ||
3. | Queue: push, pop and size | ||
4. | Queue of string: push(), empty(), front(), pop() | ||
5. | Put string into a queue |