共用方式為


ws

略過資料流的空白字元。

template class<Elem, Tr> 
   basic_istream<Elem, Tr>& ws( 
   basic_istream<Elem, Tr>& _Istr 
);

參數

  • _Istr
    資料流。

傳回值

資料流。

備註

操作工具擷取並捨棄所有項目 use_facet<ctype<Elem> >的 ch (getloc)。 is(ctype<Elem>::spacech) 為 true。

函式呼叫 setstate(eofbit),如果遇到檔案結尾,在擷取項目時。 它會傳回 _Istr。

範例

為使用執行個體 ws。請參閱 運算子>>

需求

標題: <istream>

命名空間: std

請參閱

參考

iostream 程式設計

iostreams 慣例