Suppose I have the following function:

```
void myFunc(P& first, P& last) {
    std::cout << first.child.grandchild[2] << endl;
    // ...
}

```

Now, let's assume that `first.child.grandchild[2]` is too long for my purposes. For example, suppose it will appear frequently in equations inside `myFunc(P&,P&)`. So, I'd like to create some sort of symbolic reference inside the function so that my equations would be less messy. How could I do this?

In particular, consider the code below. I need to know what statement I could insert so that not only would the output from **line\_1a** always be the same as the output from **line\_1b**, but also so that the output from **line\_2a** would always be the same as the output from **line\_2b**. In other words, I don't want a copy of the value of `first.child.grandchild`, but a reference or symbolic link to the object `first.child.grandchild`.

```
void myFunc(P& first, P& last) {
    // INSERT STATEMENT HERE TO DEFINE "g"

    std::cout << first.child.grandchild[2] << endl; // line_1a
    std::cout << g[2] << endl;                      // line_1b

    g[4] = X; // where X is an in-scope object of matching type

    std::cout << first.child.grandchild[4] << endl; // line_2a
    std::cout << g[4] << endl;                      // line_2b
    //...
}    

```