title: C++ tie one variable to two others via references
body: <p>In C++, we can define a variable by reference like:</p>
  
  <pre><code>int foo = 3;
  int &amp;bar = foo;
  </code></pre>
  
  <p>Then, the following code</p>
  
  <pre><code>cout &lt;&lt; foo &lt;&lt; " " &lt;&lt; bar;
  </code></pre>
  
  <p>will print</p>
  
  <pre><code>3 3
  </code></pre>
  
  <p>because the "value" of bar is tied to the value of foo by reference(&amp;). I'm wondering, is there a way to tie the value of "bar" to two variables? Say I have three variables: geddy, neil, and alex, and I want neil to always equal alex + geddy. Is there a way two write something like:</p>
  
  <pre><code>int alex = 4;
  int geddy = 5;
  int &amp;neil = alex + geddy;
  </code></pre>
  
  <p>So that neil will return 9? Then, if I change alex to 7, neil will return 12?</p>