I am working with a large code base, and there are a number of publicly defined variables. Unfortunately, the functions of accessing these variables has changed, and this new functionality would be best encapsulated by public accessors and a private instance variable.

So, I am trying to make this change. To do so, I planned to make each public property private and then create accessors. But, I don't want to change any of the code which accesses the old public properties. For example:

After changing the public property to private, I have the following class:

```
class Test {

    private:
        int item = 5;

    public:
        int GetItem() {
             return item;
        };

        void SetItem(int new_item) {
             item = new_item;
        };
};

```

In the past, "item" used to be a public property of the class, and it was accessed through:

```
Test* t = new Test();
int item = t->item;

```

Now though, I need to add new functionality to the way in which "item" is retrieved. For example:

```
int GetItem() {
     //  Some complicated code which changes "item"
     return item;
};

```

How can I keep the same syntax:

```
int item = t->item;

```

But have this actually perform:

```
int item = t->GetItem();

```

Any help is greatly appreciated!