1
나는 다음과 같은 한 :으로 반복 C++에서
이map<boost::tuple<int, string>, int> edges;
edges[boost::make_tuple(1, "a")] = 1;
간단한 cout << edges[boost::make_tuple(1, "a")] << endl;
그것이 한 것으로 확인;
어떻게 반복 할 수 있습니까? 다음은 작동하지 않는 것 같습니다.
typedef map<boost::tuple<int, string>, int>::iterator it_type;
for(it_type i = edges.begin(); i != edges.end(); i++) {
cout << i->first << endl;
}
고마워요!
'i-> second'를 원하셨습니까? –