{"blog_title":"asakawajunya\u306e\u30d6\u30ed\u30b0","height":"190","image_url":null,"provider_url":"https://hatena.blog","type":"rich","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fasakawajunya.hatenablog.com%2Fentry%2F20110804%2F1312408954\" title=\" C++\u306eswitch\u6587\u3067\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u30a8\u30e9\u30fc\u306b\u306a\u308b - asakawajunya\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>","blog_url":"https://asakawajunya.hatenablog.com/","author_name":"asakawajunya","provider_name":"Hatena Blog","url":"https://asakawajunya.hatenablog.com/entry/20110804/1312408954","version":"1.0","author_url":"https://blog.hatena.ne.jp/asakawajunya/","published":"2011-08-04 07:02:34","width":"100%","categories":["c++","tips"],"title":" C++\u306eswitch\u6587\u3067\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u30a8\u30e9\u30fc\u306b\u306a\u308b","description":"\u304d\u3063\u3068\u77e5\u3063\u3066\u3044\u308b\u4eba\u306b\u3068\u3063\u3066\u306f\u5f53\u305f\u308a\u524d\u306a\u3093\u3067\u3057\u3087\u3046\u304c\u3001\u30cf\u30de\u30c3\u305f\u306e\u3067\u5099\u5fd8\u9332\u3068\u3057\u3066\u3002 \u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\uff08\u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc\u7248\uff09 #include <iostream> using namespace std; struct Hoge { int i; }; Hoge get_hoge(int i) { switch(i) { case 1: // { Hoge hoge = {1}; return hoge; // } default: // { Hoge hoge = {2}; return hoge; // } } } int main(int argc, char **argv) { Hoge h\u2026"}