C++ escape character difference in osx and windows?
<p>I'm playing around with C++ in xcode and well i'm having an issue with </p>

<pre><code>char array[] = "Apple"; 
</code></pre>

<p>Technically a null escape '\0' is automatically added. I'm just writing a basic function to add the number of letters in the c-string but i go into a forever loop because it can't find the '\0'. Why is that? I'm using g++. </p>

<pre><code>int CharLength(char* word)
{
    char* temp = word;
    int count = 0 ;

    while ( temp != '\0' )
    {
        temp++;
        count++;
    }

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