title: error C2065: 'cp' : undeclared identifier
body: <p>I am a new to C, I found this tutorial about string and arrays on the internet, and tried to do the program. They are using eclipse and I am using Visual Studio 2010...please help and explain.
  I am getting these problems:</p>
  
  <pre><code>error C2143: syntax error : missing ';' before 'type'
  error C2143: syntax error : missing ';' before 'type'
  error C2143: syntax error : missing ')' before 'type'
  error C2143: syntax error : missing ';' before 'type'
  error C2065: 'cp' : undeclared identifier
  error C2100: illegal indirection
  warning C4552: '!=' : operator has no effect; expected operator with side-effect
  error C2059: syntax error : ')'
  error C2065: 'cp' : undeclared identifier
  error C2143: syntax error : missing ';' before '{'
  error C2065: 'cp' : undeclared identifier
  error C2100: illegal indirection
  </code></pre>
  
  <p>This is the code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;conio.h&gt;
  
  
  int main(char argc, char**argv){
      char s[] = "string";
      printf("string is: %s\n", s);
  
      for(char *cp = s; *cp !=0; ++cp) {
          printf("char is %c\n", *cp);
      }
      getch();
  }
  </code></pre>