{"id":256,"date":"2010-06-18T01:48:32","date_gmt":"2010-06-17T16:48:32","guid":{"rendered":"http:\/\/helloidea.org\/?p=256"},"modified":"2014-02-22T22:18:21","modified_gmt":"2014-02-22T13:18:21","slug":"%e3%83%9e%e3%82%af%e3%83%ad%e3%81%ae%e4%be%bf%e5%88%a9%e3%81%95%e3%81%ab%e6%b0%97%e3%81%a5%e3%81%84%e3%81%9f%ef%bc%81","status":"publish","type":"post","link":"https:\/\/helloidea.org\/index.php\/archives\/256.html","title":{"rendered":"C\u8a00\u8a9e\u306e\u30de\u30af\u30ed\u3067\u4fbf\u5229\u305d\u3046\u306a\u3082\u306e"},"content":{"rendered":"<div>\n<p>C\u8a00\u8a9e\u306e\u30de\u30af\u30ed\u3067\u9762\u767d\u305d\u3046\u306a\u3082\u306e\u3092\u30e1\u30e2\uff01<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\n#include\r\n\r\n#define _PFP(str) printf(&quot;%s\\n&quot;, str)\r\n#define ASIZEOF(array) (sizeof(array) \/ sizeof(array&#x5B;0]))\r\n#define FOR(i, j) for(((i) = 0); ((i) &amp;lt; (j)); ((i)++))\r\n#define ISR(str) str, #str\r\n\r\nenum etest{ aaa, bbb, ccc };\r\n\r\ntypedef struct _stest\r\n{\r\n    enum etest yyy;\r\n    char *name;\r\n}stest;\r\n\r\nint main()\r\n{\r\n    int i;\r\n\r\n    stest ts&#x5B;] = { ISR(aaa), ISR(bbb), ISR(ccc) };\r\n\r\n    FOR(i, ASIZEOF(ts))\r\n        _PFP(ts&#x5B;i].name);\r\n\r\n}\r\n<\/pre>\n<blockquote><p>\nenum\u3068\u30de\u30af\u30ed\u306e\u7d44\u307f\u5408\u308f\u305b<br \/>\nfor\u6587<br \/>\n\u914d\u5217\u306e\u8981\u7d20\u6570\u3092\u6c42\u3081\u308b\n<\/p><\/blockquote>\n<p>\u306e\uff13\u3064\u304c\u7279\u306b\u9762\u767d\u3044\u3068\u304a\u3082\u3046\u3002<br \/>\n\u7a4d\u6975\u7684\u306b\u30de\u30af\u30ed\u3092\u4f7f\u3046\u306e\u3082\u3044\u3044\u304b\u306a\u30fc\u3063<\/p>\n<p>\u305f\u3060\u3001\u30de\u30af\u30ed\u304c\u5acc\u3044\u306a\u4eba\u3082\u3044\u308b\u3068\u601d\u3046\u306e\u3067\u3001\u4f7f\u3063\u3066\u3044\u3044\u306e\u304b\u60a9\u307f\u3069\u3053\u308d\u3002\u3002<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>C\u8a00\u8a9e\u306e\u30de\u30af\u30ed\u3067\u9762\u767d\u305d\u3046\u306a\u3082\u306e\u3092\u30e1\u30e2\uff01 #include #define _PFP(str) printf(&quot;%s\\n&quot;, str) #define ASIZEOF(array) (sizeof(ar \u2026<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[49],"tags":[23,51,22,50],"class_list":["post-256","post","type-post","status-publish","format-standard","hentry","category-memo","tag-c","tag-for-macro","tag-programming","tag-macro"],"_links":{"self":[{"href":"https:\/\/helloidea.org\/index.php\/wp-json\/wp\/v2\/posts\/256","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/helloidea.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/helloidea.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/helloidea.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/helloidea.org\/index.php\/wp-json\/wp\/v2\/comments?post=256"}],"version-history":[{"count":14,"href":"https:\/\/helloidea.org\/index.php\/wp-json\/wp\/v2\/posts\/256\/revisions"}],"predecessor-version":[{"id":1279,"href":"https:\/\/helloidea.org\/index.php\/wp-json\/wp\/v2\/posts\/256\/revisions\/1279"}],"wp:attachment":[{"href":"https:\/\/helloidea.org\/index.php\/wp-json\/wp\/v2\/media?parent=256"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/helloidea.org\/index.php\/wp-json\/wp\/v2\/categories?post=256"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/helloidea.org\/index.php\/wp-json\/wp\/v2\/tags?post=256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}