• <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>
            隨筆-2  評論-1  文章-1  trackbacks-0

            istream::operator >>
            istream& operator >>( char* psz );

            istream& operator >>( unsigned char* pusz );

            istream& operator >>( signed char* pssz );

            istream& operator >>( char& rch );

            istream& operator >>( unsigned char& ruch );

            istream& operator >>( signed char& rsch );

            istream& operator >>( short& s );

            istream& operator >>( unsigned short& us );

            istream& operator >>( int& n );

            istream& operator >>( unsigned int& un );

            istream& operator >>( long& l );

            istream& operator >>( unsigned long& ul );

            istream& operator >>( float& f );

            istream& operator >>( double& d );

            istream& operator >>( long double& ld ); (16-bit only)

            istream& operator >>( streambuf* psb );

            istream& operator >>( istream& (*fcn)(istream&) );

            istream& operator >>( ios& (*fcn)(ios&) );

            這些是本來>>支持的類型。
            對于cin來說,如cin>>(int)a,而輸入一字符串,則會(huì)使cin陷入錯(cuò)誤狀態(tài),故在輸入之前應(yīng)該先檢查if(isdigit(a))。

            posted on 2006-06-27 21:34 栗子 閱讀(489) 評論(1)  編輯 收藏 引用 所屬分類: 學(xué)習(xí)有感

            評論:
            # re: 重載輸入符<< 2006-06-28 09:00 | 栗子
            cin陷入錯(cuò)誤后,可以用
            cin.clear() 來使cin輸入流恢復(fù)正確的狀態(tài)。但是,被存在緩存中的數(shù)據(jù)還是-1,所以要清空緩存。利用fflush(stdin)(只適用于VC6)。  回復(fù)  更多評論
              

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


            亚洲а∨天堂久久精品| 热re99久久精品国99热| 久久久久久久99精品免费观看| 精品久久久久久国产牛牛app | 性高湖久久久久久久久AAAAA| 97精品久久天干天天天按摩| 欧美日韩中文字幕久久伊人| segui久久国产精品| 亚洲精品久久久www| 97r久久精品国产99国产精| 狠狠人妻久久久久久综合| 中文字幕乱码久久午夜| 天天爽天天爽天天片a久久网| 国产精品久久新婚兰兰| 成人资源影音先锋久久资源网| 久久国产精品一区| 午夜精品久久久久久毛片| 91精品国产91久久综合| 欧美一区二区久久精品| 亚洲国产成人久久综合一| 无码八A片人妻少妇久久| 久久精品夜色噜噜亚洲A∨| 2022年国产精品久久久久| 新狼窝色AV性久久久久久| 久久久久国产一区二区三区| 精品综合久久久久久888蜜芽| 久久这里只有精品首页| 99久久99久久精品国产| 精品久久久久久久| AV无码久久久久不卡网站下载| 久久久久人妻一区二区三区| 久久久久女教师免费一区| 久久99热狠狠色精品一区| www.久久热| 色综合久久88色综合天天| 国内精品久久久久久99蜜桃| 久久午夜伦鲁片免费无码| 久久久久久久97| 国内精品伊人久久久久| 国产成人无码精品久久久久免费 | 国产精品久久自在自线观看|