How to draw a line using OpenGL programme

Hi,
I am new to OpenGL. Can you tell me a simple program that can draw a line between two points. I am using vc++.
Thanks

Did you try the beginner tutorials of opengl ?
Because in those tutorials, there are many many programs to show you how to create a opengl context (linux or window) and some application (with source code) from very easy ones to more complicated others.
http://www.opengl.org/developers/code/tutorials.html

Thank you very much for your information.

after you set up your basic window etc use this to draw the actual line

glLineWidth(2.5);
glColor3f(1.0, 0.0, 0.0);
glBegin(GL_LINES);
glVertex3f(0.0, 0.0, 0.0);
glVertex3f(15, 0, 0);
glEnd();

gav

Thanks Gavin. Above code works.

Have a look at NeHe’s marvellous Site with a lot of OpenGl-Tutorials:

Thanks. This site is very much useful.