title: error: A label can only be part of a statement
body: <p>I'm writing a brainfuck interpreter in C, and I'm having a little bit of trouble with the use of somethings I'm not used to. In brainfuck, a comma ( ,) is essentially getchar(). So I have the following code:</p>
  
  <pre><code>//This is just ptr
  static char *ptr;
  
  switch (command)
  {
    case ',':
      *ptr=getchar(); // Here's the code causing error
      break;
  }
  </code></pre>
  
  <p>gcc throws <code>error: a label can only be part of a statement and a declaration is not a statement</code> at me when I try to compile this.</p>
  
  <p>Any ideas? (Sorry about this, not so familiar with this error)</p>