Documentation Home
>
C++ ライブラリ・リファレンス
>
第 3 章 iostream ライブラリ
>
iostream
> 入力データの先読み
C++ ライブラリ・リファレンス
Previous
: バイナリ入力
Next
: 空白の抽出
入力データの先読み
メンバー関数
peek
を使用するとストリームから次の文字を抽出することなく、その文字を知ることができます。使用例を次に示します。
if (cin.peek() != c) return 0;
Previous
: バイナリ入力
Next
: 空白の抽出
© 2010, Oracle Corporation and/or its affiliates