• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            doing5552

            記錄每日點滴,不枉人生一世

              C++博客 :: 首頁 :: 聯(lián)系 :: 聚合  :: 管理
              73 Posts :: 0 Stories :: 94 Comments :: 0 Trackbacks

            公告

            常用鏈接

            留言簿(24)

            我參與的團隊

            最新隨筆

            搜索

            •  

            積分與排名

            • 積分 - 455263
            • 排名 - 48

            最新隨筆

            最新評論

            • 1.?re: OpenGL入門學習
            • @三胖子
              我也遇到了那個問題,能否請教一下是怎么解決的
            • --喻馨
            • 2.?re: OpenGL入門學習
            • @zhuxiangfeicool
              樓主那個設(shè)置確實什么都看不到,按您的設(shè)置,能顯示
            • --三胖子

            閱讀排行榜

            評論排行榜

            strtoul


            function
            <cstdlib>
            unsigned long int strtoul ( const char * str, char ** endptr, int base );

            Convert string to unsigned long integer

            Parses the C string str interpreting its content as an unsigned integral number of the specified base, which is returned as an unsigned long int value.

            The function first discards as many whitespace characters as necessary until the first non-whitespace character is found. Then, starting from this character, takes as many characters as possible that are valid following a syntax that depends on the base parameter, and interprets them as a numerical value. Finally, a pointer to the first character following the integer representation in str is stored in the object pointed by endptr.

            If the value of base is zero, the syntax expected is similar to that of integer constants, which is formed by a succession of:
            • An optional prefix indicating octal or hexadecimal base ("0" or "0x" respectively)
            • A sequence of decimal digits (if no base prefix was specified) or either octal or hexadecimal digits if a specific prefix is present


            If the base value is between 2 and 36, the format expected for the integral number is a succession of the valid digits and/or letters needed to represent integers of the specified radix (starting from '0' and up to 'z'/'Z' for radix 36). If the base is 16, the sequence may optionally be preceded by "0x" or "0X", which is ignored.

            If the first sequence of non-whitespace characters in str is not a valid integral number as defined above, or if no such sequence exists because either str is empty or it contains only whitespace characters, no conversion is performed.

            Parameters

            str
            C string containing the representation of an unsigned integral number.
            endptr
            Reference to an object of type char*, whose value is set by the function to the next character in str after the numerical value.
            This parameter can also be a null pointer, in which case it is not used.


            Return Value

            On success, the function returns the converted integral number as a long int value.
            If no valid conversion could be performed, a zero value is returned.
            If the correct value is out of the range of representable values, ULONG_MAX is returned, an the global variable errno is set to ERANGE.

            Example

            1
            2
            3
            4
            5
            6
            7
            8
            9
            10
            11
            12
            13
            14
            /* strtoul example */
                        #include <stdio.h>
                        #include <stdlib.h>
                        int main ()
                        {
                        char szInput [256];
                        unsigned long ul;
                        printf ("Enter an unsigned number: ");
                        fgets (szInput,256,stdin);
                        ul = strtoul (szInput,NULL,0);
                        printf ("Value entered: %lu. Its double: %lu\n",ul,ul*2);
                        return 0;
                        }


            For an example with the endptr parameter in action see strtol.

            See also

            posted on 2010-07-13 17:02 doing5552 閱讀(596) 評論(0)  編輯 收藏 引用

            只有注冊用戶登錄后才能發(fā)表評論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


            精品久久人人爽天天玩人人妻| 狠狠干狠狠久久| 亚洲性久久久影院| 久久午夜伦鲁片免费无码| 亚洲国产精品久久久久婷婷软件| 久久精品99无色码中文字幕| 日韩十八禁一区二区久久| 亚洲AV无码久久| 精品人妻伦九区久久AAA片69| 超级97碰碰碰碰久久久久最新| 久久精品国产亚洲AV无码偷窥| 久久99精品久久久久久噜噜| 久久久久久久人妻无码中文字幕爆| 91精品日韩人妻无码久久不卡| 狠狠综合久久综合88亚洲| 国产精品久久久久久久午夜片| 欧洲成人午夜精品无码区久久 | 久久久久亚洲AV成人片| 久久精品国产亚洲精品| 99久久99久久精品免费看蜜桃| 亚洲国产精品综合久久网络| 久久久中文字幕| 国产亚洲综合久久系列| 久久久久久国产精品无码下载| 久久久99精品成人片中文字幕| 久久免费精品视频| 国产精品久久亚洲不卡动漫| 亚洲精品无码久久久久sm| 久久人人添人人爽添人人片牛牛| 国产呻吟久久久久久久92| 国产精品久久久久影院嫩草| 久久99精品久久久久久动态图| 777午夜精品久久av蜜臀| 久久久久久久久久久久久久| 久久香综合精品久久伊人| 久久婷婷午色综合夜啪| 亚洲国产成人精品女人久久久| 青春久久| 亚洲va久久久噜噜噜久久狠狠| 亚洲国产精品无码久久一区二区| 伊人久久无码中文字幕|