title: Function to get char and compare it with a token
body: <p>So what I'm trying to do is a function where I receive a <code>char line[ ]</code> (this string is get from <code>fgets</code> a file in other function) and what I want is to count the number of times that a certain token appears in the string. The thing is that it's always giving me the error <code>Comparison between pointer and integer</code> and I don't know where the pointer is in my code.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>int validaString(char line[ ]){
      int i=0, j=0;   
      while (line[i] != "\n"){
          if(line[i] == "-" || line[i]== " ")
              j++;
          i++;
      }
      if(j==4)
          return 0;
      else 
          return 1;
  }
  </code></pre>