vector 의 find 함수, set 의 find 함수 예

 vector L;
    L.push_back(Vec(1,0,0));
    L.push_back(Vec(2,0,0));
    L.push_back(Vec(3,0,0));
    L.push_back(Vec(4,0,0));
    L.push_back(Vec(5,0,0));

    vector::iterator result = find(L.begin(), L.end(), Vec(0,0,0)); 
    if (result == L.end())  
        cout << "No" << endl;
    else //  
        cout << "Yes" << endl;
auto it = s.find(node{ d[i], times[d[i]]-1});     //    ,   ,  times,      
		if (it != s.end()) {
			s.erase(it);
		}
map t;
if(t.find(key) != t.end()){
	t.find(key)->sencond;
}

좋은 웹페이지 즐겨찾기