• <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  評(píng)論-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&) );

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

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

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

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


            久久久无码人妻精品无码| 久久久久亚洲AV综合波多野结衣| 久久夜色精品国产噜噜麻豆 | 久久亚洲私人国产精品| 久久久久国产精品三级网| 国产亚洲精品自在久久| 91精品观看91久久久久久| 99久久www免费人成精品 | 色婷婷综合久久久久中文 | 一本色道久久综合狠狠躁| 久久只这里是精品66| 国产亚洲综合久久系列| 亚洲国产成人精品无码久久久久久综合 | 日韩中文久久| 久久精品毛片免费观看| 久久男人AV资源网站| 国产成人精品久久一区二区三区av| 久久人人爽人人爽人人av东京热| 蜜臀久久99精品久久久久久小说 | 午夜精品久久久久久影视777| 国产精品免费久久| 色欲综合久久躁天天躁蜜桃| 久久青草国产手机看片福利盒子| 欧美日韩精品久久久久| 免费无码国产欧美久久18| 精品综合久久久久久88小说| 亚洲色欲久久久久综合网| 久久精品www| 精品综合久久久久久97超人 | 青青青国产成人久久111网站| 91精品免费久久久久久久久| 2021国产精品久久精品| 久久久99精品成人片中文字幕| 久久ZYZ资源站无码中文动漫| www.久久99| 老司机国内精品久久久久| 久久久久高潮毛片免费全部播放| 香蕉久久夜色精品国产2020| 色99久久久久高潮综合影院| 国产精品美女久久久久AV福利| 久久综合九色综合久99|