May 14, 2013 at 1:03pm UTC
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?
May 14, 2013 at 1:15pm UTC
cin is an object, ignore() and clear() are its non-static member functions.
May 14, 2013 at 2:12pm UTC
An object of the iostream class? Does using #include<iostream> just mean I don't have to type iostream::cin.ignore() ?
May 14, 2013 at 2:29pm UTC
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 May 14, 2013 at 2:30pm UTC
May 14, 2013 at 7:59pm UTC
I'm guessing this will make more sense when I get to the section of the tutorial on namespaces.