Don't make data members public within a class. Make them private (or protected) and then overload the input operator.
Don't make data members public within a class. Make them private (or protected) and then overload the input operator.
FAQ
"The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs." -- Joseph Weizenbaum.
"If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it." -- Richard Pattis.