How can i just draw a basic line in 3d

u see i have a cube rotating but the axis rotate with - the way it should be but i want to draw a basic line from the quad to indicate the X,Y,Z axis - i dont need detailed stuff just the command i need to draw lines and or pixels EG
GL_Line(0.0f,0.0f,0.0f,1.0f,1.0f,1.0f)

How to draw a single line:

glBegin(GL_LINES);
glVertex3f(0.0f, 0.0f, 0.0f);
glVertex3f(1.0f, 0.0f, 0.0f);
glEnd();

In a GL_LINES, a line will be drawn between each sucessive pair of vertices. If you use GL_LINE_STRIP a line will be drawn going through all vertices, and a GL_LINE_LOOP will do the same but connect the last vertex to the first.

glBegin(GL_LINES];
  glVertex3f(0.0f,0.0f,0.0f);
  glVertex3f(1.0f,1.0f,1.0f);
glEnd();

I didn’t fully understand what you were saying here:

u see i have a cube rotating but the axis rotate with
<…>
i want to draw a basic line from the quad to indicate the X,Y,Z axis

If you are trying to plot axes and don’t want them to rotate with the cube, you’ll have to reset the transformation matrix - every vertex passed to gl will be transformed.

glLoadIdentity();
//whatever you need for your cube
glRotate(…);
glTranslate(…);
//render the cube

//reset the modelview matrix
glLoadIdentity();
//render the axes

You can change transformation matrices whenever and as many times as you want while rendering a frame.

HTH