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.
Hello, this approach doesnt work for me, dont know why !
[UPDATE] friend worked
Solution.cpp:74:49: error: ‘std::ostream& Box::operator<<(std::ostream&, Box&)’ must have exactly one argument
ostream& operator<<(ostream& out, Box& B) {
^
Solution.cpp: In function ‘void check2()’:
Solution.cpp:114:8: error: no match for ‘operator<<’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream’} and ‘Box’)
cout<
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 →
Hello, this approach doesnt work for me, dont know why ! [UPDATE] friend worked
Solution.cpp:74:49: error: ‘std::ostream& Box::operator<<(std::ostream&, Box&)’ must have exactly one argument ostream& operator<<(ostream& out, Box& B) { ^ Solution.cpp: In function ‘void check2()’: Solution.cpp:114:8: error: no match for ‘operator<<’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream’} and ‘Box’) cout<