fork download
  1. #include <iostream>
  2.  
  3. class Foo {
  4. char bar[5];
  5. };
  6.  
  7. int main() {
  8. Foo a, b;
  9.  
  10. std::cout << (a == b) << '\n';
  11. std::cout << (a == "test") << '\n';
  12. }
  13.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:10:18: error: no match for ‘operator==’ (operand types are ‘Foo’ and ‘Foo’)
  std::cout << (a == b) << '\n';
                  ^
prog.cpp:11:18: error: no match for ‘operator==’ (operand types are ‘Foo’ and ‘const char [5]’)
  std::cout << (a == "test") << '\n';
                  ^
stdout
Standard output is empty