본문 바로가기

개발팁

c++ vector 사용법 팁

vector<int> one = {1,2,3,4,5};
vector<int> two = {2,1,2,3,2,4,2,5};
vector<int> thr = {3,3,1,1,2,2,4,4,5,5};

배열같이 입력가능


int they_max = *max_element(they.begin(),they.end());

*max_element로 최댓값 구할 수 있음



https://hyeonstorage.tistory.com/324 

vector 기본 사용법 적혀있음

'개발팁' 카테고리의 다른 글

Error: Cannot find module 'request'  (0) 2022.01.18
안드로이드 - 서버 세션유지  (0) 2019.03.08
c++ 순열 조합  (0) 2019.02.12
c++ string  (0) 2019.02.11