title: i keep running into problems with if elif and else in c++
body: <p>question: every time I run the program and I input who are you it says Error Value of a is not matching what is going on? (yes I am a noob to c++)
  code: </p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  int main () {
  
     // local variable declaration:
     string a;
     cin &gt;&gt; a;
     // check the boolean condition
     if( a == "hello" ) {
        // if condition is true then print the following
        cout &lt;&lt; "hi" &lt;&lt; endl;
     } else if( a == "who are you" ) {
        // if else if condition is true
        cout &lt;&lt; "a better question is who are you?" &lt;&lt; endl;
     } else if( a == "what am i doing" ) {
        // if else if condition is true
        cout &lt;&lt; "reading this output  " &lt;&lt; endl;
     }else {
        // if none of the conditions is true
        cout &lt;&lt; "Error Value of a is not matching" &lt;&lt; endl;
     }
     return 0;
  }
  </code></pre>