• Advertisement
Sign in to follow this  

Multiple array initial values set up method?

This topic is 4270 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I would like to define pts[0] only before processing pts. But I get parse error for below code. GLfloat pts[20][12][3]; pts[0]={{-20.0, 0.0, -5}, {-20.0, 0.0,0}, {-2.0, 0.0, -5}, {-2.0, 0.0, 0}, {-1, -3.0, -5}, {-1, -3.0, 0}, {1, -3.0, -5}, {1.0, -3.0, 0}, {2,0,-5}, {2,0,0}, {20,0,-5}, {20,0,0}};

Share this post


Link to post
Share on other sites
Advertisement
array/struct initializers can only be used at the first place of definition, you cannot use array/struct initializers in an assignment operation, assignment != initialization.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement