"C++ 큐 size()"의 두 판 사이의 차이

 
1번째 줄: 1번째 줄:
==개요==
==개요==
;C++ 큐 size()
;C++ 큐 size()
;C++ 큐 크기
;C++ 큐 원소 개수


<syntaxhighlight lang='cpp' run>
<syntaxhighlight lang='cpp' run>

2023년 9월 9일 (토) 16:49 기준 최신판

1 개요[ | ]

C++ 큐 size()
C++ 큐 크기
C++ 큐 원소 개수
#include <iostream>
#include <queue>
using namespace std;

int main() {
    queue<int> q;
    q.push(3);
    q.push(1);
    q.push(4);
    q.push(8);
    
    cout << q.size(); // 4
}

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}