title: Why does my program give "NULL used in arithmetic"
body: <p>I wrote the following;</p>
  
  <pre><code>string words;
  int a=0;
  getline(cin,words);
  
  while(words[a]!=NULL)
  {                           
       a++;                    
  }        
  cout&lt;&lt;a&lt;&lt;endl;
  </code></pre>
  
  <p>It worked correctly, but when I added the line at the end:</p>
  
  <pre><code>string words;
  int a=0;
  getline(cin,words);
  
  while(words[a]!=NULL)
  {
        a++;                       
  }
  cout&lt;&lt;a&lt;&lt;endl;
  
  if(words[1]=="a") {cout&lt;&lt;"the letter is a";}
  </code></pre>
  
  <p>It no longer works.  Why?</p>