How to compare single string chars in C++? : <p>I wanted to compare two single string variable in my SC and if they were different, I wanted to add +1 to my int data "fights", let's say <em>X[1] = A, Y[1] = B, add +1 to <strong>fights</em></strong>.</p>

<pre><code>    int N;
    char X;
    char Y;

    int fights = 0;

    1 &lt;= N &lt;= 100000;

    for (int i = 0; i &lt; N; i++){
        cin &gt;&gt; X[i];
        cin &gt;&gt; Y[i];

        if (Y[i] != X[i]){
           fights += 1;
        }     
    }
    cout &lt;&lt; fights;

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

<p>However, it seems like the program is not detecting any differences when I input different letters and does not add +1 to <strong><em>fights</em></strong>.</p>
