Posts Tagged ‘11227’
Assume the existence of a Window class with integer data members width and height. Overload the >> operator for the Window class — i.e., write a nonmember istream-returning function that accepts a reference to an istream object and a reference to a Window object and reads the next two values from the istream in to the width and height members respectively. Don’t forget to have the function return the proper value as well. Assume the operator has been declared a friend in the Window class .
LANGUAGE: C++ CHALLENGE: Assume the existence of a Window class with integer data members width and height. Overload the >> operator for the Window class — i.e., write a nonmember istream-returning function that accepts a reference to an istream object and a reference to a Window object and reads the next two values from the…
Read More