title: Checking if an input is within its range of limits in C++
body: <p>I need to create multiple functions that will check if an input is valid or not.
  Here are some of my codes:</p>
  
  <pre><code>bool IsValidRange(signed char s)
  {
      bool isValid = true;
      if (!((s&gt;=SCHAR_MIN)&amp;&amp;(s&lt;=SCHAR_MAX)))
      {
          isValid = false;
      }
      return isValid;
  }
  
  bool IsValidRange(int s)
  {
      bool isValid = true;
      if (!((s&gt;=INT_MIN)&amp;&amp;(s&lt;=INT_MAX)))
      {
          isValid = false;
      }
      return isValid;
  }
  </code></pre>
  
  <p>I'm using the header limits.h for this. Am I doing this the right way? Please take note that I'm just a beginner. I hope you all will understand. Thank you!</p>