큐1 queue 선언 queue queue1; 마지막 요소에 데이터 추가 queue1.push(11); queue1.push(22); queue1.push(33); queue1.push(44); queue1.push(55); 첫번째 요소 데이터 조회 queue1.front() 첫번째 요소 데이터 추출 queue1.pop(); 큐가 비어있는지 확인 queue1.empty(); 데이터 순환 size = (int)queue1.size(); for (int i = 0; i < size; i++) { printf("%d \n", queue1.front()); queue1.pop(); } printf("queue1 size(%d) = %zd \n\n", queue1.empty(), queue1.size()); 데이터 교체 queu.. 2022. 8. 6. 이전 1 다음