0
How do u "cin" values into members of a class.
I wanted to "cin" an integer value for a class member, it gave a compiler error.
2 ответов
0
Is the class member public? That would be a precondition of course.
Otherwise cin >> instance.value; should work... (although you'd normally rather use a setter).
Let me run and try this. ;-)
EDIT: Works as expected.
0
class member is public, HonFu