"C++ 벡터 empty()"의 두 판 사이의 차이

(새 문서: ==개요== ;C++ 벡터 empty() <syntaxhighlight lang='console'> #include <iostream> #include <vector> using namespace std; int main() { vector<int> v; cout << v.empty() << e...)
 
 
2번째 줄: 2번째 줄:
;C++ 벡터 empty()
;C++ 벡터 empty()


<syntaxhighlight lang='console'>
<syntaxhighlight lang='cpp' run>
#include <iostream>
#include <iostream>
#include <vector>
#include <vector>

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

1 개요[ | ]

C++ 벡터 empty()
#include <iostream>
#include <vector>
using namespace std;

int main() {
    vector<int> v;
    cout << v.empty() << endl; // 1
    v.push_back(3);
    cout << v.empty() << endl; // 0
}

2 같이 보기[ | ]

3 참고[ | ]

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