{"published":"2006-11-14 15:02:32","description":"\u305d\u306e\u30af\u30e9\u30b9\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3059\u3079\u3066\u304c\u540c\u3058\uff11\u3064\u306e\u5909\u6570\u3092\u5171\u6709\u3059\u308b\u3002 class myclass { static int a; // \u30af\u30e9\u30b9\u5909\u6570\uff08\u3053\u308c\u306f\u5ba3\u8a00\u3057\u305f\u3060\u3051\uff09 public: void seta(int n){ a = n; } int geta(){ return a; } }; int myclass::a; // \u5b9a\u7fa9 int main() { myclass ob1, ob2; ob1.seta(10); cout << ob1.geta() << endl; // 10 cout << ob2.geta() << endl; // 10 }","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fexh.hatenadiary.org%2Fentry%2F20061114%2F1163484152\" title=\"\u30af\u30e9\u30b9\u5909\u6570\uff08\u30af\u30e9\u30b9\u5c5e\u6027\uff0c\u9759\u7684\u5909\u6570\uff0cstatic\u30af\u30e9\u30b9\u30e1\u30f3\u30d0\uff09 - exh\u306e\u65e5\u8a18\" 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","author_url":"https://blog.hatena.ne.jp/exh/","width":"100%","url":"https://exh.hatenadiary.org/entry/20061114/1163484152","provider_url":"https://hatena.blog","height":"190","author_name":"exh","blog_url":"https://exh.hatenadiary.org/","blog_title":"exh\u306e\u65e5\u8a18","image_url":null,"title":"\u30af\u30e9\u30b9\u5909\u6570\uff08\u30af\u30e9\u30b9\u5c5e\u6027\uff0c\u9759\u7684\u5909\u6570\uff0cstatic\u30af\u30e9\u30b9\u30e1\u30f3\u30d0\uff09","type":"rich","provider_name":"Hatena Blog","categories":["C++"]}