Is initialized struct immutable?
<p>I initialized a test case as a global variable, here:</p>

<pre><code>void InsertNode(BSTNode* &amp;t, const int &amp;key) {
    if (t == NULL) {
        t = new BSTNode;
        t-&gt;key = key;
        t-&gt;left = t-&gt;right = NULL;
    } else {
        if (key != t-&gt;key) {
        if (key &lt; t-&gt;key)
                InsertNode(t-&gt;left, key);
            else
                InsertNode(t-&gt;right, key);
        }
    }
}

BSTNode t1[] = {
 {4, &amp;t1[1], &amp;t1[2]},
 {2, &amp;t1[3], &amp;t1[4]},
 {6, &amp;t1[5], &amp;t1[6]},
 {1, NULL, NULL},
 {3, NULL, NULL},
 {5, NULL, NULL},
 {7, NULL, NULL}
};

int main() {
    InsertNode(t1, 0);
    return 0;
}
</code></pre>

<p>However, when I try to modify t1, it gives me an error:</p>

<pre><code>invalid initialization of non-const reference of type 'BSTNode*&amp;' from a temporary of type 'BSTNode*'
</code></pre>

<p>Could someone explain this for me? Thank you!!</p>
