title: how to create exception for char when the input should be int
body: <pre><code>try
  {
    int selection;
  
    if(selection &gt; 4 || selection &lt; 1)  
      throw selection;
  }
  catch(int selection)
  {
     cout &lt;&lt; "Menu selection out of range." &lt;&lt; endl; 
  }
  </code></pre>
  
  <p>The above code works fine for int values that are out of range, but I cannot get it to work if a char value is entered at (cin >> selection). </p>
  
  <p>I have tried to post a catch block with an ellipsis [catch(...)] to account for char entries but that does not work. </p>
  
  <p>I have also tried a catch block with [catch(char selection)] but that does not work either. </p>
  
  <p>I would like to use an exception to handle this error as it would help in my overall project in other menu type areas. </p>