Update main.c

Fixing compiling errors.