If you’ve been copying the code from the chapters, you may run into trouble when your program hits the
glGenVertexArrays function in the form of an Access Violation/segfault.
To fix this, add the following statement right above your call to
glewExperimental = GL_TRUE;
There seems to be some trouble with GLEW not entirely supporting the Core Profile out of the box, but the above fix should get you by for the time being.