setstate

About the IO condition states, if I try to set and clear the condition flags, it works. However, for the IO library function s.setstate(flag), the C++ Primer Fourth Edition says: “setstate leaves the existing state variables unchanged except that it adds the additional indicated state(s)”. My question is: How is it possible that a flag (badbit, failbit or eofbit) is unchanged if I change the flag by setting it?
Thank you.
Read that sentence over a few more times. It's just poorly-written.
Topic archived. No new replies allowed.