#1
by fly3555 » 5年前
https://qiita.com/_EnumHack/items/f462042ec99a31881a81
では
コード:
auto const& [k, v] = *begin(dic);
や
コード:
for (auto const& [k, v] : dic)
printf("(%d,%d)\n", k, v);
}
のように、mapの要素を[k, v]などと表記していますが、私の環境ではエラーが出ます。
この書き方は便宜上のものなのでしょうか?
環境はWindows 10, MinGW6.3.0, #include <bits/stdc++.h>です
https://qiita.com/_EnumHack/items/f462042ec99a31881a81
では
[code]
auto const& [k, v] = *begin(dic);
[/code]
や
[code]
for (auto const& [k, v] : dic)
printf("(%d,%d)\n", k, v);
}
[/code]
のように、mapの要素を[k, v]などと表記していますが、私の環境ではエラーが出ます。
この書き方は便宜上のものなのでしょうか?
環境はWindows 10, MinGW6.3.0, #include <bits/stdc++.h>です