'function' : number overloads have no legal conversions for 'this' pointer
2008-09-24 16:21
The compiler could not convert the this pointer to any of the overloaded versions of the member function.
This error may be caused by invoking a non-const member function on a const object. To correct the problem, remove the const from the object declaration or add const to one of the member function overloads.
The following is an example of this error:
class C { public: void foo() volatile; void foo(); // adding const here would fix problem };
const C *pcc;
void main() { pcc->foo(); // error }
ps: if you declare the const object, the member function to be called should be const. if you declare the non const object, it would call the normal member function, or call the const member function(if exit, and no normal member function declaration);