C++ã®æ°ãããã£ã¹ã å¾æ¥ã®ãã£ã¹ãã®åé¡ç¹ ç°ãªãåã¸ã®å¤æã«ããã¦ãC/C++ã§ã¯ãã£ã¹ããç¨ãããã¾ãã // intããlongã¸ã®ãã£ã¹ã int ival; int lval = (long)ival; ãåç¥ã®ã¨ããããã£ã¹ãã¯é常ã«å±éºã§ãã æ¬æ¥ãªãã°åã®ä¸ä¸è´ã«ããã³ã³ãã¤ã«ã¨ã©ã¼ãããä¼ããã®ã§ãããã ãã£ã¹ãã®ä½¿ããæ¹(æå³)ã¯ã大ãã3種(åå¤æ/åå¤æ´/constå¤ã)ã«åé¡ããã¾ãã åå¤æ // int ãã double 㸠int ival; double dval = (double)ival; åå¤æ´ // long ãã int* 㸠long lval; int* iptr = (int*)lval; constå¤ã // const int* ãã int* 㸠const int* ciptr; int* iptr = (int*)cip
{{#tags}}- {{label}}
{{/tags}}