<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>madotubo</author_name>
  <author_url>https://blog.hatena.ne.jp/madotubo/</author_url>
  <blog_title>言語解明</blog_title>
  <blog_url>https://madotubo.hatenadiary.org/</blog_url>
  <categories>
    <anon>C++</anon>
  </categories>
  <description>Cではブロックの先頭で変数の宣言をしなくてはならないという制限があったが、C++ではどこでも宣言できる。実際、変数宣言は使う直前に済ませるのが望ましい。なぜなら宣言したはいいが場合によっては使わないということがあるからだ。 void swap(int *a, int *b){ int box; //変数宣言 if(*a == *b){ return; } //*a == *b のとき、結局&quot;box&quot;変数は不要となる box = *a; *a = *b; *b = box; }</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmadotubo.hatenadiary.org%2Fentry%2F20120605%2F1338892777&quot; title=&quot;変数宣言の位置 - 言語解明&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>2012-06-05 19:39:37</published>
  <title>変数宣言の位置</title>
  <type>rich</type>
  <url>https://madotubo.hatenadiary.org/entry/20120605/1338892777</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
