Property Function

Property Function can be used as a variable, inserted directly where a variable is. Calling function(f which calls a property Function) can access the value of pfunc and can update pfunc by supplying the new value as an argument to the caller.
 avatar
unknown
d
6 months ago
183 B
8
Indexable
struct Foo
{
    @property int data() { return m_data; } // read property

    @property int data(int value) { return m_data = value; } // write property

  private:
    int m_data;
}
Editor is loading...
Leave a Comment