E2346 'x' access specifier of property 'property' must be a member function (C++)

From RAD Studio
Jump to: navigation, search

Go Up to Compiler Errors And Warnings (C++) Index

Only member functions or data members are allowed in access specifications of properties.

Example:

int GlobalGetter(void)
{
     return 0;
}
struct pbase
{
     intMemberGetter(void) {return 1;}
     int __property ip1 = { read = GlobalGetter }; // Error
     int __property ip2 = { read = MemberGetter }; // OK
};