<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>exh</author_name>
  <author_url>https://blog.hatena.ne.jp/exh/</author_url>
  <blog_title>exhの日記</blog_title>
  <blog_url>https://exh.hatenadiary.org/</blog_url>
  <categories>
    <anon>C++</anon>
  </categories>
  <description>そのクラスのインスタンスすべてが同じ１つの変数を共有する。 class myclass { static int a; // クラス変数（これは宣言しただけ） public: void seta(int n){ a = n; } int geta(){ return a; } }; int myclass::a; // 定義 int main() { myclass ob1, ob2; ob1.seta(10); cout &lt;&lt; ob1.geta() &lt;&lt; endl; // 10 cout &lt;&lt; ob2.geta() &lt;&lt; endl; // 10 }</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fexh.hatenadiary.org%2Fentry%2F20061114%2F1163484152&quot; title=&quot;クラス変数（クラス属性，静的変数，staticクラスメンバ） - exhの日記&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>2006-11-14 15:02:32</published>
  <title>クラス変数（クラス属性，静的変数，staticクラスメンバ）</title>
  <type>rich</type>
  <url>https://exh.hatenadiary.org/entry/20061114/1163484152</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
