• <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&) );

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

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

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

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


            久久久久久极精品久久久| 欧美色综合久久久久久| 久久精品中文无码资源站| 日韩AV毛片精品久久久| 亚洲精品成人久久久| 久久A级毛片免费观看| 国产99久久久久久免费看| 久久婷婷五月综合成人D啪| 亚洲午夜久久久影院伊人| 国产精品免费久久久久久久久 | 精品久久久久久国产| 理论片午午伦夜理片久久| 午夜不卡888久久| 久久久久亚洲av无码专区喷水| 亚洲欧洲精品成人久久曰影片| 色欲av伊人久久大香线蕉影院| 国内精品久久久久久久久| 久久av无码专区亚洲av桃花岛| 久久青青色综合| 日韩久久久久中文字幕人妻| 久久精品国产亚洲av瑜伽| 久久久久亚洲国产| 国内精品伊人久久久久777| 久久婷婷色香五月综合激情| 亚洲国产精品嫩草影院久久 | 精品久久久噜噜噜久久久| 无码人妻少妇久久中文字幕蜜桃| 久久人人爽人人爽人人片AV东京热 | 99久久免费国产精品热| 爱做久久久久久| 久久久无码精品亚洲日韩蜜臀浪潮| 99久久99久久精品国产片果冻| 69久久精品无码一区二区| 伊人热人久久中文字幕| 久久99国产精品久久99小说 | 亚洲人成电影网站久久| 2020久久精品国产免费| 亚洲国产成人精品91久久久 | 亚洲色欲久久久综合网东京热| 久久免费精品视频| 99久久国产热无码精品免费 |