boolåã§åæåãããã¯ã©ã¹ãããã¨ããã struct Boolen { Boolen( bool ) { } } ; æ®å¿µãªããããã®ã¯ã©ã¹ã¯ããã¾ãå®ãããªãããªããªãã°ãC++ã«ã¯ãå¿ã ããæé»ã®åå¤æã¨ãããã®ãããããã ã int main() { Boolen a = true ; // OKãå½ç¶ã Boolen b = 123 ; // OKããã¡ï¼ Boolen c = &a ; // OKããããããããããã ã常èçã«èã㦠} ãã®ãããªé¦¬é¹¿ããã³ã¼ãã¯ãã³ã³ãã¤ã«ã¨ã©ã¼ã«ãªã£ã¦æ¬²ããããããæ°å¤ããã¤ã³ã¿ã¼ãboolã¨ãã¦æ±ãããã®ã§ããã°ãæ示çã«ãã£ã¹ãããã¹ããªã®ã ã int main() { Boolen a = true ; // OKãå½ç¶ã Boolen b = bool( 123 ) ; // èªåãä½ããã¦ããã®ãã¯ååæ¿ç¥ãã¦ãã Bool
{{#tags}}- {{label}}
{{/tags}}