How to create a curve when points are given

hi all ,
I’m new to opengl.I have a coordinates file(x,y,z) and what I want is to create a curve from that points.Can anybody plz help me to make a curve from given xyz points.(Im using glfw with opengl)

OpenGL-Tutorials/main.cpp at master · SonarSystems/OpenGL-Tutorials · GitHub]
In this example when i give the 3 value there is nothing showing up.
the curve should look like this