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]

This bullet is forwarded from the Beginner’s Section, because there is no response.

No need to do multiple cross post
You will not have more answers by repeadting your question again and again.
And your code blocks are wrong, the end slash should be in the other direction, like this /

Instead, concentrate on advices that were already given to you.
If continue to have problems, continue on one single post.