主页
C++
C++ 队列
demo_queue_remove
运行 ❯
×
更改方向
保存代码
更改主题
#include
#include
using namespace std; int main() { // Create a queue of strings queue
cars; // Add elements to the queue cars.push("Volvo"); cars.push("BMW"); cars.push("Ford"); cars.push("Mazda"); // Remove the front element (Volvo) cars.pop(); // Access the front element (Now BMW) cout << cars.front(); return 0; }
BMW