title: super simple currency converter switch acting oddly?
body: <p>This was an exercise from <em>Principles and Practice Using C++</em> to make a basic currency converter using if checks then to remake it with switches. Everything runs pretty good except or my middle switch. It doesn't seem to work like the rest of the program. Every other one is fine with me entering in data like <em>111y, 111p</em> but when working with euros it NEEDS a whitespace or else it will go to the default switch. I did a break point and currency is not being set to e or E and it's only with the euros!</p>
  
  <p>I hope it isn't anything too silly, but it's got me confused Bjarne doesn't explain this one :P I don't have <em>#include iostream</em> in the code because it's all handled with *std_lib_facilities* Just wanted to say that before someone points it out XD</p>
  
  <pre><code>#include "std_lib_facilities.h"
  
  using namespace std;
  
  int main()
  {
      double dollar = 0;
      char currency = ' ';
      const double yen = 0.010;
      const double euro = 1.31;
      const double pound = 0.65;
      double sum = 0;
  
      cout &lt;&lt; "Please enter amount and Y for yen or E for Euro or P for pound.\n";
      cin &gt;&gt; dollar &gt;&gt; currency;
  
      switch(currency)
      {
          case 'Y': case'y':
          {
              sum = dollar * yen;
              cout &lt;&lt; dollar &lt;&lt; " is equal to " &lt;&lt; sum &lt;&lt; " yen.\n";
              break;
          }
          case 'E': case'e':
          {
              sum = dollar * euro;
              cout &lt;&lt; dollar &lt;&lt; " is equal to " &lt;&lt; sum &lt;&lt; " euro.\n";
              break;
          }
          case 'P': case'p':
          {
              sum = dollar * yen;
              cout &lt;&lt; dollar &lt;&lt; " is equal to " &lt;&lt; sum &lt;&lt; " pound.\n";
              break;
          }
          default:
              cout &lt;&lt; "Wrong values...\n";
              break;
      }
      keep_window_open();
      return 0;
  }
  </code></pre>