title: How to fix "invalid conversion from 'char*' to 'char'" error?
body: <p>I have a problem in compiling this source . 
  This is my source :</p>
  
  <pre><code> #include &lt;iostream&gt;
  #include &lt;string&gt;
  
  using namespace std;
  char pass[7],d;
  int v;
  
  int isvalid(char pass);
  
  int main(int argc, char** argv) {
      cout&lt;&lt;"Enter Password :";
      gets(pass);
      cout&lt;&lt;endl;
      v=isvalid (pass);
      if(v==1){
          cout&lt;&lt;"The Password is Correct . You can Come in"&lt;&lt;endl;
      }
      else{
          cout&lt;&lt;"The Password in InCorrect ! You Can't Come In"&lt;&lt;endl;
      }
      system("PAUSE");
      return 0;
  }
  /*-----------Functions--------------*/
  int isvalid(char pass){
      d="Pokerface";
      if(pass==d){
          return 1;
      }
      else{
          return 0;
      }
  }
  </code></pre>
  
  <p>It should get a password from user and check it with isvalid function and say  It is correct or not but compiler (DEV C++ 5) shows me these errors :</p>
  
  <pre><code>    In function 'int main(int, char**)':
  14  17      [Error] invalid conversion from 'char*' to 'char' [-fpermissive]
  8   5       [Note] initializing argument 1 of 'int isvalid(char)'
      In function 'int isvalid(char)':
  26  3   [Error] invalid conversion from 'const char*' to 'char' [-fpermissive]
  28      recipe for target 'main.o' failed
  </code></pre>
  
  <p>What is the problem ? please help me.</p>