개발팁

c++ vector 사용법 팁

은찐찐 2019. 2. 11. 12:00
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 기본 사용법 적혀있음