{"published":"2015-06-26 07:36:46","provider_name":"Hatena Blog","categories":["C++"],"title":"\u591a\u6b21\u5143std::vector\u306e\u521d\u671f\u5316(C++11)","height":"190","provider_url":"https://hatena.blog","url":"https://matsu7874.hatenablog.com/entry/2015/06/26/073646","description":"C++11\u3060\u3068std::vector\u306e\u521d\u671f\u5316\u306f\u4e00\u884c\u3067\u66f8\u3051\u308b\u3002 std::vector<int> \u5909\u6570\u540d(\u8981\u7d20\u6570, \u4f55\u3067\u57cb\u3081\u308b\u306e\u304b); #include <iostream> #include <vector> int main(){ int k = 3; int count = 0; std::vector<std::vector<int>> vv(k, std::vector<int>(k, 1)); for(auto v: vv){ for(auto t: v){ count += t; std::cout << count << std::endl; } } return 0; } 1 \u2026","image_url":null,"blog_url":"https://matsu7874.hatenablog.com/","author_url":"https://blog.hatena.ne.jp/matsu7874/","author_name":"matsu7874","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmatsu7874.hatenablog.com%2Fentry%2F2015%2F06%2F26%2F073646\" title=\"\u591a\u6b21\u5143std::vector\u306e\u521d\u671f\u5316(C++11) - matsu7874\u306e\u30d6\u30ed\u30b0\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","version":"1.0","blog_title":"matsu7874\u306e\u30d6\u30ed\u30b0","width":"100%","type":"rich"}