title: Simple if condition with strings
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/8004237/how-do-i-properly-compare-strings-in-c">How do I properly compare strings in C?</a>  </p>
  </blockquote>
  
  
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  int main(){
  
      char name[100];
      cout&lt;&lt;"Enter: ";
      cin&gt;&gt;name;
      if(name == "hello"){
          cout&lt;&lt;"Yes it works!";
      }
  
      return 0;
  }
  </code></pre>
  
  <p>Why when I entered hello in the prompt i didnt got "Yes it works!" message?</p>