[æ»ã] shin 2002/08/09(é) 06:04:22 C++ã®enumåã§å®£è¨ããåã®ãµã¤ãºã決ããæ¹æ³ã¯ããã®ã§ãããã? ANSI Cã ã¨intåã«ãªãããã§ãããC++ã§ã®æ¯ãèããç¥ãããã§ãã Cã¨åãããªã¨æã£ãã®ã§ãããDirectXã®ããããè¦ãã¨ä¸ã®ããã«ãªã£ã¦ã¾ããã enum foo { foo0, foo1, foo_FORCE_DWORD = 0x7FFFFFFF }; ãã®è¨è¿°ãããã³ã³ãã¤ã©ã¯enumåã®å ¨å®æ°ã®å¤åã調ã¹ããããããµã¤ãºã決ããã®ããª?ã ã¨æãã¾ãããã§ããå®éã¯å¤åã«é¢ä¿ãªãsizeof(int)åºå®ã§ããã (VC++6.0+SP5ã®çºãsizeof(int)==4) èªèº«ã§èª¿ã¹ãçµæã¯ãå¶å¾¡ã§ããªããã§ããã ã§ãããä¸ã®ä¾ã§ããããfoo_FORCE_DWORDãè¨ãã¦ããäºããå¤æããã¨ã åºæ¥ãããªæ°ããã¾ãã ç´°ã
{{#tags}}- {{label}}
{{/tags}}