• <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,而輸入一字符串,則會使cin陷入錯誤狀態(tài),故在輸入之前應(yīng)該先檢查if(isdigit(a))。

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

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

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


            亚洲AV无一区二区三区久久| 国产高潮国产高潮久久久91 | 四虎影视久久久免费| 久久综合中文字幕| 国产精品成人久久久久久久| 大香网伊人久久综合网2020| 久久精品国产亚洲Aⅴ香蕉| 久久久久久毛片免费看| 日韩久久久久中文字幕人妻 | 久久久久国色AV免费观看| 久久影院午夜理论片无码| 久久精品中文字幕大胸| 久久久久亚洲AV无码永不| 97久久超碰国产精品旧版| 国产毛片久久久久久国产毛片 | 久久乐国产综合亚洲精品| 亚洲精品无码久久久久AV麻豆| 日本精品一区二区久久久| 亚洲午夜久久久影院伊人| 国产V亚洲V天堂无码久久久| 久久99国产精品久久| 久久久久亚洲AV无码专区网站 | 一本久久知道综合久久| 久久久久人妻一区精品色 | 久久久久免费视频| 亚洲va久久久噜噜噜久久男同| 久久精品国产亚洲沈樵| 怡红院日本一道日本久久| 午夜精品久久影院蜜桃 | 久久99久久99小草精品免视看| 久久高清一级毛片| 欧美亚洲色综久久精品国产| 精品多毛少妇人妻AV免费久久| 亚洲国产精品久久久天堂| 久久91这里精品国产2020| 久久综合久久自在自线精品自| 国产成人精品久久亚洲| 精品免费久久久久久久| 亚洲欧洲精品成人久久奇米网| 99久久这里只有精品| 久久精品日日躁夜夜躁欧美|