<istream>函式</istream>
如需 Visual Studio 2017 的最新文件請參閱 Visual Studio 2017 文件。
<istream>交換 | ws |
<istream>交換
交換兩個資料流物件的項目。
template <class Elem, class Tr>
void swap(
basic_istream<Elem, Tr>& left,
basic_istream<Elem, Tr>& right);
template <class Elem, class Tr>
void swap(
basic_iostream<Elem, Tr>& left,
basic_iostream<Elem, Tr>& right);
參數
left
資料流。
right
資料流。
ws
略過資料流中的空白字元。
template class
<Elem, Tr> basic_istream<Elem, Tr>& ws(basic_istream<Elem, Tr>& _Istr);
參數
_Istr
資料流。
傳回值
資料流。
備註
操作工具會擷取並捨棄任何項目ch
的use_facet< ctype< Elem> > ( getloc)。 is( ctype< Elem>:: space, ch) is true.
函式呼叫setstate( eofbit) 擷取項目時遇到的檔案結尾。 它會傳回 _Istr
。
範例
請參閱運算子 >>的使用範例ws
。