[SOLVED]error: a label can only be part of a statement...
Posted: Mon Dec 19, 2011 5:28 am
I'm writing a brainfuck interpreter in C, and I'm having issues with some code. I'm not used to gcc, but I haven't had a programming problem (that I couldn't solve) in a long time, and this is different than the code I normally write.
A ',' in brainfuck is supposed to take a single character input. So:
This is causing an error:
I really have no idea why
A ',' in brainfuck is supposed to take a single character input. So:
Code: Select all
// This is just what ptr is
static char *ptr;
// Here's the code causing error
case ',':
ptr*=getchar();
break;
Code: Select all
error: a label can only be part of a statement and a declaration is not a statement