Calling lua functions from C++ with luabind?
Quote:Original post by bobofjoe
Looks like you never define operator==.
I don't understand, can you clarify your statement please? I've never heard of operator until today and I have no idea what I need to do.
I thought you may be talking about the std operators so I tried this:
bool std::operator==(E_WINDOW);
But it returns the same error as the luabind operators:
Quote:
1>.\Main.cpp(966) : error C2838: '==' : illegal qualified name in member declaration
You need to define how the operator works in the context of your class, eg:
class MyClass{ int x;public: MyClass(int _x):x(_x){} bool operator ==(const MyClass&rhs) { return x == rhs.x; }};int main(){ MyClass a(5), b(10), c(5); a == a;//true a == b;//false a == c;//true b == c;//false};
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement