fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class opOverload{
  5. public:
  6. bool operator==(opOverload temp){
  7. if(*this == temp){
  8. cout << "both same";
  9. return true;
  10. }
  11. else{
  12. cout <<"both different";
  13. return false;
  14. }
  15.  
  16. }
  17. };
  18.  
  19. int main() {
  20. // your code goes here
  21. opOverload a1,a2;
  22. a1==a2;
  23. return 0;
  24. }
Runtime error #stdin #stdout 0s 11512KB
stdin
Standard input is empty
stdout
Standard output is empty