C++ – Access violation error when using glut on vista


I am new in OpenGL. I am using glut library in VC express edition on vista. I am getting runtime error of "access violation" on the following line


Can I avoid this error somehow?

Best Solution

For me setting project properties -> linker -> advanced -> data execution prevention to /NXCOMPAT:NO solved the problem.