Question about cin.ignore()

The format of using a period is object.member is it not? So why does cin.ignore() or cin.clear() work? Are ignore() and clear() static member functions or what?
cin is an object, ignore() and clear() are its non-static member functions.
An object of the iostream class? Does using #include<iostream> just mean I don't have to type iostream::cin.ignore() ?
std::cin is an object whose type is std::istream.

No, iostream::cin.ignore() makes no more sense than string::s.size() or int::n++
Last edited on
I'm guessing this will make more sense when I get to the section of the tutorial on namespaces.
Topic archived. No new replies allowed.