We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
of class like this: I used this manner and didn't make any of the getfunctions.
classBox{// class definitionfriendstd::ostream&operator<<(std::ostream&out,constBox&obj);};std::ostream&operator<<(std::ostream&out,constBox&obj){returnout<<obj.m_length<<" "<<obj.m_breadth<<" "<<obj.m_height;}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Box It!
You are viewing a single comment's thread. Return to all comments →
make it as a
friend
of class like this: I used this manner and didn't make any of the getfunctions.