sylwke3100 sylwke3100 22.06.2013, 21:24:57 3 + Jak za pomocą iteratora i pętli for przeszukać. map < int, map < DataType, string > >' Próbowałem **auto** ale wywala taki błąd:|47|error: ‘const struct std::pair > >’ has no member named ‘size’#programowanie #cpp
AgresywnyKaloryfer AgresywnyKaloryfer 22.06.2013, 21:29:18 0 + for(map < int, map < DataType, string > >::iterator i = mapa.begin(); i != mapa.end(); i++){i->key (to będzie int)i->valuePokaż całość
Rincewind Rincewind 22.06.2013, 22:04:27 0 + for (auto i = mapa.begin(); i != mapa.end(); ++i) {// i->first: klucz mapy// i->second: wartosc mapy(mapa wewnetrzna)}Generalnie typ iteratora dla std::mapPokaż całość
map < int, map < DataType, string > >'
|47|error: ‘const struct std::pair > >’ has no member named ‘size’Próbowałem **auto** ale wywala taki błąd:
#programowanie #cpp
{
i->key (to będzie int)
i->value
for (auto i = mapa.begin(); i != mapa.end(); ++i) {// i->first: klucz mapy// i->second: wartosc mapy(mapa wewnetrzna)}Generalnie typ iteratora dla
std::map