Код: Выделить всё
queue q;
q.push(5);
q.push(2);
int & a = q.front(); // a = 5 now
q.pop();
q.push(123);
cout
Подробнее здесь: [url]https://stackoverflow.com/questions/63599011/getting-reference-of-the-front-element-when-queue-is-popped[/url]Код: Выделить всё
queue q;
q.push(5);
q.push(2);
int & a = q.front(); // a = 5 now
q.pop();
q.push(123);
cout
Подробнее здесь: [url]https://stackoverflow.com/questions/63599011/getting-reference-of-the-front-element-when-queue-is-popped[/url]