"The Debugger has exited due to signal 10" when writing a char* iteration
<p>So I have a program that makes char* stuff lowercase. It does it by iterating through and manipulating the ascii. Now I know there's probably some library for this in c++, but that's not the point - I'm a student trying to get a grasp on char*s and stuff :).</p>

<p>Here's my code:</p>

<pre><code>#include &lt;iostream&gt;

using namespace std;

char* tolower(char* src);

int main (int argc, char * const argv[])
{
    char* hello = "Hello, World!\n";

    cout &lt;&lt; tolower(hello);
    return 0;
}

char* tolower(char* src)
{
    int ascii;
    for (int n = 0; n &lt;= strlen(src); n++)
    {
     ascii = int(src[n]);
     if (ascii &gt;= 65 &amp;&amp; ascii &lt;= 90)
     {
      src[n] = char(ascii+32);
     }
    }

    return src;
}
</code></pre>

<p>( this is not for an assignment ;) )</p>

<p>It builds fine, but when I run it it I get a "The Debugger has exited due to signal 10" and Xcode points me to the line: "src[n] = char(ascii+32);"</p>

<p>Thanks!</p>

<p>Mark</p>
