In Visual Studio
stdlib.h: error C2381: 'exit' : redifinition; __declspec(noreturn) differs
glut.h: see declaration of 'exit'
when such error occurs
#include <GL/glut.h>
#include <stdlib.h>
causes error, so
#include <stdlib.h>
#include <GL/glut.h>
will solve the problem