먼저 들어간 데이터가 먼저 나오는 줄서기와 같은 구조. FIFO 방식

#include <iostream>
#include <queue>
using namespace std;

int main() {
    queue<int> q;
    q.push(10); // 마지막 위치에 데이터 삽입
    q.push(20);
    q.push(40);
    q.push(30);
    
    printf("%d\n", q.front()); // 처음 데이터
    q.pop();                   // 처음 데이터 삭제
    printf("%d\n", q.back());  // 마지막 데이터
   
    printf("%d\n", q.size());  // 큐 크기
    printf("%d\n", q.empty()); // 비어있으면 1 아니면 0
}