Translations of this page?:

atol

文法:

    #include <cstdlib>
    long atol( const char *文字列 );

atol()関数は、文字列をロング型の数値に変換して返します。atol()は、long型に入らないような文字を見つけるまで、文字列を読み込みます。結果は数値に変換されて返されます。

サンプル:

     x = atol( "1024.0001" );

変数xには1024Lがセットされます。

関連トピック: atof, atoi, sprintf, strtol

 
• • • SitemapRecent changesRSScc