Hi I'm not a "native" C/C++ programmer. I'm able to write some basic things and do a coding that is common to other languages. But I have this problem and I don't know even how to ask different then explaining it (thus google searching won't fit me).
I've got in my code
typedef float point3[3];
And now I'm initilizing a bunch of points in 3D (x,y,z) by this:
point3 cpoint = {computeX(u,v),computeY(u,v)-5,computeZ(u,v)};
What functions does and values of u and v are irrevelent to my question (but I can provide code if asked).
Now I want to declare an array (one dimensional) of point3. So when I call array[0] I will get a point3 type variable. How I can do that?
EDIT:
I provided insufficient information. My bad. I need to retain: typedef float point3[3]; because I'm using OpenGL with GLUT and using this function glVertex3fv(cpoint); where cpoint is point3 type. So I'm pretty sure I can't use struct.