title: Memory access violation. What's wrong with this seemingly simple program?
body: <p>This is a quick program I just wrote up to see if I even remembered how to start a c++ program from scratch.  It's just reversing a string (in place), and looks generally correct to me.  Why doesn't this work?</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  void strReverse(char *original)
  {
      char temp;
      int i;
      int j;
      for (i = 0, j = strlen(original) - 1; i &lt; j; i++, j--)
      {
          temp = original[i];
          original[i] = original[j];
          original[j] = temp;
      }
  }
  
  void main()
  {
      char *someString = "Hi there, I'm bad at this.";
      strReverse(someString);
  
  }
  </code></pre>