title: Creating an error message if user inputs too many characters
body: <p>I'm pretty new to coding so I apologize if this is trivial. I'm supposed to create an error message when the user enters more characters than my <code>const int SIZE2</code> array, which is 20 characters.
  My array is called <code>major</code>: </p>
  
  <pre><code>&gt;cout &lt;&lt; "Enter your major: " &lt;&lt; endl &lt;&lt; endl;
  &gt;48         cin.width(SIZE2);
  &gt;49         cin.get(major,SIZE2, '\n');
  &gt;50         majorLength = strlen(major);
  &gt;51         
  &gt;52         if(majorLength &gt; SIZE2)
  &gt;53         {   
  &gt;54             cout &lt;&lt; "Too many characters, Enter major again: " &lt;&lt; endl;
  &gt;55             cin.get(major, SIZE2, '\n');
  &gt;56             cin.ignore(100, '\n');
  &gt;57          
  &gt;58         }
  </code></pre>
  
  <p>It's compiling just fine but skipping over my if-statement.</p>