<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>matsu7874</author_name>
  <author_url>https://blog.hatena.ne.jp/matsu7874/</author_url>
  <blog_title>matsu7874のブログ</blog_title>
  <blog_url>https://matsu7874.hatenablog.com/</blog_url>
  <categories>
    <anon>C++</anon>
  </categories>
  <description>C++11だとstd::vectorの初期化は一行で書ける。 std::vector&lt;int&gt; 変数名(要素数, 何で埋めるのか); #include &lt;iostream&gt; #include &lt;vector&gt; int main(){ int k = 3; int count = 0; std::vector&lt;std::vector&lt;int&gt;&gt; vv(k, std::vector&lt;int&gt;(k, 1)); for(auto v: vv){ for(auto t: v){ count += t; std::cout &lt;&lt; count &lt;&lt; std::endl; } } return 0; } 1 …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmatsu7874.hatenablog.com%2Fentry%2F2015%2F06%2F26%2F073646&quot; title=&quot;多次元std::vectorの初期化(C++11) - matsu7874のブログ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2015-06-26 07:36:46</published>
  <title>多次元std::vectorの初期化(C++11)</title>
  <type>rich</type>
  <url>https://matsu7874.hatenablog.com/entry/2015/06/26/073646</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
