fork download
  1. class TestClass
  2. {
  3. public:
  4. void Normalize() { }
  5.  
  6. int Normalize() const {return data;}
  7.  
  8. int& Normalize() {return data;}
  9.  
  10. private:
  11. int data;
  12. };
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:8:10: error: ‘int& TestClass::Normalize()’ cannot be overloaded
prog.cpp:4:10: error: with ‘void TestClass::Normalize()’
stdout
Standard output is empty