title: C++ error: "Using obsolete binding"
body: <p>My compiler isn't liking several things about the following code. Any help much appreciated. Feel free to criticize the hell out of me since I'm a programming n00b. I know you guys can be harsh. </p>
  
  <pre><code>// Method 2, the additive swap, explained inside. 
  void strrev2(std::string&amp; str) { 
      unsigned len = str.size(); 
      for (unsigned i = 0, j = len - 1; i &lt; j; i++, j--) { 
          short a = (int)str[i]; // a is the ASCII value of the i-th character of the string
          short b = (int)str[j]; // b is the ASCII value of the j-th character of the string
  
          //             Current value of a        Current value of b
          a = a + b; //      a + b                         b        
          b = a - b; //      a + b                         a
          a = a - b; //        b                           a
      }
  
      str[i] = (char)a;
      str[j] = (char)b;
  } 
  </code></pre>