you will first need two variables to store your width and height.
int width, height;
as described on page 14 of the manual.
glfwSetWindowPos(width / 2, height / 2);
and as a bonus you can call
glfwGetWindowSize(&width, &height);
this function is void and does not return any value, however it will update the two previously declared variables .. so put it in mainloop or in a window to change the callback function.
this can be checked in the official manual here on page 15.
iKlsR
source share