dynamically drawing

hi all
I am doing a program where i pick points on the screen by clicking a mouse. i convert them to the window coords and store them in (x[i],y[i]).After each click of the screen i should see all the point(s) that i had clicked earlier.

to get this done,can i do something like this?
in the drawing function i have the following:
for(i=0;i<count;i++) // count of number of clicks- gets updated after each click
this does not give me anything on the screen. Am i doing the coding correctly or should i check something else?

You can’t define line with just one vertex. So, use glBegin(GL_POINTS).

As said pseudo, u can’t draw a line with one vertex but u’r code is not wrong.
You’r count parameter should be a pair number.

Could you send the code just before the glbegin ??