16:17: error: 'MyCalss' has not been declared In member function 'int MyClass::Compare(int&)': 18:33: error: request for member 'value' in 'x', which is of non-class type 'int' In function 'int main()': 32:21: error: no matching function for call to 'MyClass::Compare(MyClass&)' 32:21: note: candidate is: 16:9: note: int MyClass::Compare(int&) 16:9: note: no known conversion for argument 1 from 'MyClass' to 'int&'
I'm using codebolcks.
Changing the return type of function "Compare" to bool did not solve the problem.
changed to function return type to "bool"
bool Compare(MyCalss& x)
{
return (this->value > x.value);
}
still getting below compilation errors,
16:18: error: 'MyCalss' has not been declared In member function 'bool MyClass::Compare(int&)': 18:33: error: request for member 'value' in 'x', which is of non-class type 'int' In function 'int main()': 32:21: error: no matching function for call to 'MyClass::Compare(MyClass&)' 32:21: note: candidate is: 16:10: note: bool MyClass::Compare(int&) 16:10: note: no known conversion for argument 1 from 'MyClass' to 'int&'