【发布时间】:2020-11-23 05:33:24
【问题描述】:
#include <iostream>
#include <queue>
using namespace std;
int main(){
queue<int, int> q1;
q1.push({3, 5});
int x = q1.front().first;
int y = q2.front().second;
cout << x, y << endl;
return 0;
}
不知道是哪里出错了,请指点一下好吗?
【问题讨论】:
-
显示您的代码。不知道
queue是什么。 minimal reproducible example -
你在哪里定义了 q2?为什么你使用 q2.front(),而不是 q1?