Exception thrown at 0x00000000 in Project3.exe: 0xC0000005: Access violation executing location 0x00000000. occurred : i get this error tring to draw a tringle(?) with opengl i dont know why 

glew 2.1.0
glfw3.2.1 win32

iam new and its my first time posing in overflow


   

     #include    <gl\glew.h>
    #include    <GLFW/glfw3.h>
    #include     <iostream>
    using namespace std;
    int main(void)

    {
    	GLFWwindow* window;
    


	glewInit();
	//if (glewInit != GLEW_OK)
	//	std::cout << "ew";
	/* Initialize the library */
	if (!glfwInit())
		return -1;

	/* Create a windowed mode window and its OpenGL context */
	window = glfwCreateWindow(640, 480, "Hello World", NULL, NULL);
	if (!window)
	{
		glfwTerminate();
		return -1;
	}
	
	/* Make the window's context current */
	glfwMakeContextCurrent(window);
	
	float poss[6] = {
		-0.5, -0.5,
		0.0,   0.5,
		0.5, -0.5
	};
	unsigned int buffer;
	glGenBuffers(1, &buffer);
	glBindBuffer(GL_ARRAY_BUFFER, buffer);
	glBufferData(GL_ARRAY_BUFFER, 6 * sizeof(float), poss, GL_STATIC_DRAW);
	/* Loop until the user closes the window */
	while (!glfwWindowShouldClose(window))
	{
		/* Render here */
		glClear(GL_COLOR_BUFFER_BIT);
		glDrawArrays(GL_TRIANGLES, 0, 3);

		/* Swap front and back buffers */
		glfwSwapBuffers(window);

		/* Poll for and process events */
		glfwPollEvents();
	}

	glfwTerminate();
	return 0;
}

if anyone know how plz help me i searched online and i couldnt find a solution even though theres lots facing the same problem guess i just too noob to undersand it indirectly