Generation

generate functionTue, 28 Mar 2023

define un vector de colas

#include <bits/stdc++.h> using namespace std; // programa que define un vector de colas int main() { // Define a queue queue<int> q; // Pushing elements in the queue: // enqueue() function is used to insert the elements q.push(10); q.push(20); q.push(30); // Displaying the elements of queue // Empty() function is used to check if the queue is empty or not while (!q.empty()) { cout << q.front() << " "; q.pop(); } return 0; }

Want to kickstart your project?Use the new AI Studio to create your code