RAD Studio
ContentsIndex
PreviousUpNext
E2235: Member function must be called or its address taken

A reference to a member function must be called, or its address must be taken with & operator. 

In this case, a member function has been used in an illegal context. 

For example:

class A
{
   typedef int (A::* infptr)(void);
public:
   A();
   int myex(void);
   int three;
} a;
A::A()
{
   infptr one = myex;       //illegal - call myex or take address?
   infptr two = &A::myex;   //correct
   three = (a.*one)() + (a.*two)();
}
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!