...
In this example, the first read will not overflow, but the could fill bufOne
with a truncated string. Furthermore the second read still could overflow bufTwo
. The C++ Standard, [istream.extractors], paragraphs 7–9, describes the behavior of operator>>(basic_istream &, charT *)
, and states in part [ISO/IEC 14882-2014]:
...