"Stack around the variable was corrupted" error
<p>I'm trying to read a char value using fgets as follows:</p>

<pre><code>int main() {
    char m_cityCharCount;

    // Input the number of cities
    fgets(&amp;m_cityCharCount, 4, stdin);
    return 0;
}
</code></pre>

<p>Visual Studio returns this error after the code is executed - <code>Stack around the variable m_cityCharCount was corrupted</code> </p>

<p>Is there something I can do about it?</p>