gluBeginCurve Problem...

hi there,

I have a barrier with the function gluBeginCurve()


for(i=0; i<140; i++){
	           gluBeginCurve(theNurb[i]);
       
           gluNurbsCurve(theNurb[i], 8, knot, 3, &ctrlpoints[i][0][0], 4, GL_MAP1_VERTEX_3);
	   
        gluEndCurve(theNurb[i]);
	
   }
[\CODE]

the code above can be built, but that responses "access violation at **.exe 0x2392jikm".  

I do not think i misuse the pointer here, I declare the variants in the seperate class.


for(i=0; i<140; i++){
for(j=0; j<20; j++){
gluBeginCurve(theNurb[i*20+j]);

       gluNurbsCurve(theNurb[i*20+j], 8, knot, 3, &ctrlpoints[i][0][0], 4, GL_MAP1_VERTEX_3);
   
    gluEndCurve(theNurb[i*20+j]);
   }

}
the above code is my favorite design, but it response the same problem with the one level iteration.

Please give me a hand on that…

cheers,
Yang
[\CODE]