title: C++: "error: invalid operands of types 'const char*' and 'const char [28]' to binary 'operator+'"
body: <p>Peeps. I'm a noob. I have a question to ask but here's my code below.</p>
  
  <pre><code>int main() {
  int a, c, favNum;
  favNum = 3;
  cout &lt;&lt; "Hello! Please enter a number in the space below. This number will be called 'a'. " &lt;&lt; endl;
  cout &lt;&lt; "Enter:  " &lt;&lt; endl;
  cin &gt;&gt; a;
  
  
  if ( typeid(a) == typeid(int) &amp;&amp; cin.fail()==false){
      cout &lt;&lt; "Great Job!" &lt;&lt; endl;
      cout &lt;&lt; "Let's do cool stuff with this program! " &lt;&lt; endl;
     * cout &lt;&lt; "Type '1' for checking whether your number, " + a + ", is a 
      number divisible by," + favNum + "." &lt;&lt; endl;
      cout &lt;&lt; "Type '2' to recieve a compliment " &lt;&lt; endl;
      cin &gt;&gt; c;
   switch (c) {
      case 1:
         cout &lt;&lt; "Awesome!" &lt;&lt; endl;
         if( a%favNum == 0 ){
        *   cout &lt;&lt; "Your 'a' number, " +a+ ", is a number divisible by 
           'favNum'," +favNum+ "." &lt;&lt; endl;
         } else if (a%favNum != 0){
        *   cout &lt;&lt; "Your 'a' number, " +a+ ", is a number not divisible by 
           'favNum'," +favNum+ "." &lt;&lt; endl;
         }
         break();
  
     case 2:
      cout &lt;&lt; "Great Job!" &lt;&lt; endl;
  
      }
  
      } else {
        cout &lt;&lt; "Oops.. Might wanna try to write a number. Doesn't look like a 
        number to me.." &lt;&lt; endl;
        cout &lt;&lt; "Please restart your program and follow instructions next 
      time." 
       &lt;&lt; endl;
  }
  </code></pre>
  
  <p>Basically what my program does is it takes an input of a number 'a', and checks if it's a number and if it is, it uses "switch case" to direct me to 2 options. </p>
  
  <p>Problem: It shows me this weird error <strong><em>"error: invalid operands of types 'const char</em>' and 'const char [28]' to binary 'operator+'"</strong> and I have no idea what it means. It popped me this error on lines 16,23,and 25, and I asterisked the lines so you can see where the error shows up. Thanks if you can help me!</p>
  
  <p>EDIT: My question <strong><em>WAS</em></strong> what is the error? and why my program is not working? I <strong><em>realized</em></strong>  that I had done a + b instead of a &lt;&lt; "+" &lt;&lt; b. I've been working on 2-3 languages in coding, and I made an error. Just 1 day ago, I even said my question was answered. Thank you.</p>
  
  <p>BTW: Program worked just fine before switch case! LOL
  EDIT: Question solved.</p>