直接上样例
#include<bits/stdc++.h> using namespace std; struct node{ int x, y; }; queue<node> que; int main(){ node xx; xx.x = 1, xx.y = 2; que.push(xx); node yy = que.front(); cout << yy.x << " " << yy.y; return 0; }