title: Check if returned value is integer or char
body: <p>I have a little "blackjack" program coded in C++. The thing is that the program asks questions like "Would you like... (y/n)?" where user needs to type y/n. I want to check if the value returned is actually the type that I want. So function that should return int, returns int and function that should return char, returns char, before it actually returns something.</p>
  
  <p>I would need some suggestions guys. I think it's not that difficult, I just can't find any solution. Thank you.</p>
  
  <p>Code:</p>
  
  <pre><code>char pickCard(){
      char aCard;
      std::cout &lt;&lt; "Would you like another card?";
      std::cin &gt;&gt; aCard;
      if (aCard is a char){
          return aChar;
      } else {
          std::cout &lt;&lt; "Not a char!";
      }
  }
  </code></pre>