I am trying to compile this code (gonna be a simulation of Langton's Ant):
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
typedef struct
{
unsigned short x, y;
enum directions {up = 0, right, down, left} direction;
} langtonsAnt;
void turnAnt (lantonsAnt *pant, unsigned short quarterTurns)
{
pant->direction = (pant->direction + quarterTurns) % 4;
}
int main ()
{
return EXIT_SUCCESS;
}
However, I keep getting this error:
12|error: expected ')' before '*' token|
The compiler is gcc.
I cannot figure out what's wrong as I already searched the web and various references.
P.S. Don't worry about the headers, those are needed elsewhere in the program.
langtosAnt
. Line 12:lantosAnt
. Note the missingg
...