Oracle® Solaris Studio 12.4: C++ User's Guide

Exit Print View

Updated: March 2015
 
 

13.3.7 Peeking at Input

You can use the peek member function to look at the next character in the stream without extracting it. For example:

if (cin.peek()!= c) return 0;